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

Example curl doesn't work #4

Closed mvdan closed 7 years ago

mvdan commented 7 years ago
 $ curl http://localhost:5000/api --header 'content-type: application/json' --data '{text: "This is a text that I want to be analyzed."}' -X POST
{"message": "The browser (or proxy) sent a request that this server could not understand."}

I assume you meant something like this instead, which does work:

 $ curl http://localhost:5000/api --header 'Content-Type: application/json' --data '{"text": "This is a text that I want to be analyzed."}' -X POST
{"numOfSentences": 1, "lang": "en", "performance": [0.18333840370178223], "sentences": [[{"pos": "DET", "email": false, "ner": "", "stop": true, "token": ...
jgontrum commented 7 years ago

Right, thanks for pointing that out! Damn these copy-paste mistakes...