faust-streaming / faust

Python Stream Processing. A Faust fork
https://faust-streaming.github.io/faust/
Other
1.65k stars 183 forks source link

Web requests are routed using wrong method #188

Closed ondrejchmelar closed 3 years ago

ondrejchmelar commented 3 years ago

Checklist

Steps to reproduce

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

Expected 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

patkivikram commented 3 years ago

Yes the solution looks good! Can you submit a PR with your change?