Chalice Testing issue for POST request in Blueprint
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
When I was trying to test a POST method from Blue Print the RestAPIEventHandler class routes are always GET so as a result I am always getting "Unsupported Method POST" from _main_rest_api_handler method in app.py. But if I move my method from bluprint module to main app.py then it works fine also when I deploy the app all looks ok and it work perfectly.
Blueprint function :
@singleRealTime.route("/", methods=["POST"])
def index():
return singleRealTime.current_request.json_body
Application Function:
@singleRealTime.route("/index", methods=["POST"])
def index():
return singleRealTime.current_request.json_body
Return Routes :
defaultdict(, {'/realtime/inference/v1/{team}/{model}': {'GET': }, '/': {'**GET**': }, '/index': {'**POST**': }})
Contributor guide
Assessment
This issue has not been assessed yet.