You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found calling the predict API slightly confusing
I had to provide the application/json content type and include my string inside quotes (otherwise it fell over), it feels halfway between a raw POST API and something that is REST based
Suggestion:
Leave the content type as application/json and have the API accept the text via small JSON object e.g.
{
"text": "All my text here"
}
Also accept text/plain or unspecified content type, and permit a plain raw string as POST body, e.g. curl -X POST -d "Have you seen my hat?" http://localhost:5000/predict
Thoughts?
The text was updated successfully, but these errors were encountered:
I found calling the predict API slightly confusing
I had to provide the
application/json
content type and include my string inside quotes (otherwise it fell over), it feels halfway between a raw POST API and something that is REST basedSuggestion:
application/json
and have the API accept the text via small JSON object e.g.text/plain
or unspecified content type, and permit a plain raw string as POST body, e.g.curl -X POST -d "Have you seen my hat?" http://localhost:5000/predict
Thoughts?
The text was updated successfully, but these errors were encountered: