Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web requests are routed using wrong method #188

Closed
1 of 2 tasks
ondrejchmelar opened this issue Sep 1, 2021 · 1 comment · Fixed by #191
Closed
1 of 2 tasks

Web requests are routed using wrong method #188

ondrejchmelar opened this issue Sep 1, 2021 · 1 comment · Fixed by #191

Comments

@ondrejchmelar
Copy link
Contributor

Checklist

  • I have included information about relevant versions
  • I have verified that the issue persists when using the master branch of Faust.

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

  • Python version: CPython 3.9.5
  • Faust version: v0.6.9
  • Operating system: Linux x86_64
  • Kafka version: kafka_2.13-2.7.0
  • RocksDB version (if applicable): python-rocksdb==0.7.0
@patkivikram
Copy link
Collaborator

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

ondrejchmelar pushed a commit to ondrejchmelar/faust that referenced this issue Oct 4, 2021
taybin pushed a commit that referenced this issue Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants