Closed ondrejchmelar closed 3 years ago
master
Create a class view with @app.page decorator and implement a post method as per https://faust.readthedocs.io/en/latest/userguide/tasks.html#http-verbs-get-post-put-delete
@app.page
post
When running multiple workers, request is routed with POST method.
Requests to other workers are made using GET method.
Looks like GET is always used at https://github.com/faust-streaming/faust/blob/master/faust/app/router.py#L73
Could be as simple as calling app.http_client.request(request.method, routed_url).
app.http_client.request(request.method, routed_url)
Yes the solution looks good! Can you submit a PR with your change?
Checklist
master
branch of Faust.Steps to reproduce
Create a class view with
@app.page
decorator and implement apost
method as per https://faust.readthedocs.io/en/latest/userguide/tasks.html#http-verbs-get-post-put-deleteExpected behavior
When running multiple workers, request is routed with POST method.
Actual behavior
Requests to other workers are made using GET method.
Looks like GET is always used at https://github.com/faust-streaming/faust/blob/master/faust/app/router.py#L73
Could be as simple as calling
app.http_client.request(request.method, routed_url)
.Versions