deploifai / meteorite

A fast and simple web server for machine learning models
https://pypi.org/project/meteorite
MIT License
8 stars 1 forks source link

plain text request rejected by `Content type error` #14

Open 98sean98 opened 11 months ago

98sean98 commented 11 months ago

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.