jgontrum / spacy-api-docker

spaCy REST API, wrapped in a Docker container.
https://hub.docker.com/r/jgontrum/spacyapi/
MIT License
265 stars 99 forks source link

The REST API returns JSON payload with Content-Type "text/string" #49

Open mgZenMaster opened 2 years ago

mgZenMaster commented 2 years ago

This makes some clients need to bend over backwards to process the results. The fix for this seems to be fairly easy, just change the HUG annotations, for example: @hug.post("/dep", output=hug.output_format.json) This would be, of course, a change in the spacy-services repository, but I can't open an issue there.