You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Methods related to client's request (get_json, get_text, get_data) are inexplicably methods of AppResponse instead of AppRequest. The AppRequest presumably refers to the data sent from the client and is used as such for other client message methods like get_headers, get_cookies, get_url, etc.
Describe the solution you'd like
All methods related to client's request should be part of AppRequest.
Describe alternatives you've considered
Additional context
Minimal example (version 0.0.27):
fromsocketifyimportAppasyncdefroot(res, req):
print(type(res))
print(awaitres.get_json())
res.end("Hello World socketify from Python!")
app.post('/', root)
app.listen(17999, lambdaconfig: print("Listening on port http://localhost:%d now\n"%config.port))
app.run()
Is your feature request related to a problem? Please describe.
Methods related to client's request (
get_json
,get_text
,get_data
) are inexplicably methods of AppResponse instead of AppRequest. The AppRequest presumably refers to the data sent from the client and is used as such for other client message methods likeget_headers
,get_cookies
,get_url
, etc.Describe the solution you'd like
All methods related to client's request should be part of AppRequest.
Describe alternatives you've considered
Additional context
Minimal example (version 0.0.27):
Then:
curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST http://localhost:17999/
Which gives:
The text was updated successfully, but these errors were encountered: