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

plain text request rejected by Content type error #14

Open
98sean98 opened this issue Nov 3, 2023 · 0 comments
Open

plain text request rejected by Content type error #14

98sean98 opened this issue Nov 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@98sean98
Copy link
Contributor

98sean98 commented Nov 3, 2023

Plain text requests are now being rejected by Content type error, and the inference function wrapped by @app.predict simply doesn't get executed.

For example, sending a curl request:

curl -X POST http://localhost:4000/predict -H 'Content-Type: text/plain' -d 'hello world'

returns

Content type error

But

curl -X POST http://localhost:4000/predict -H 'Content-Type: application/json' -d '{}'

executes the inference function with an expected output.

This is without any change to the inference function.


This problem only surfaced in version 0.1.0 but not 0.0.5.

@98sean98 98sean98 added the bug Something isn't working label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant