I am not sure about how the mashape GUI test works, if I just select am image and click on the “test endpoint” button, I also got the 500 error.
However, I tested the endpoint by using curl like this:
HTTP/1.1 202 ACCEPTED Allow: POST, PUT, OPTIONS Content-Language: en Content-Type: application/json Date: Tue, 17 Feb 2015 17:03:20 GMT Server: Mashape/5.0.6 Vary: Accept X-RateLimit-requests-Limit: 40000 X-RateLimit-requests-Remaining: 40000 Content-Length: 754 Connection: keep-alive
{“frames”:[{“framename”:“15_EDXvFyL”,“results”:[{“x”:94,“y”:676,“width”:869,“height”:35,“text”:">Krise in der Ukraine: Russland verteidigt Truppenstationierung an der Grenzregion"},{“x”:103,“y”:612,“width”:181,“height”:46,“text”:“® tagesschau”},{“x”:153,“y”:509,“width”:800,“height”:78,“text”:“Mehr als 30 Tote geborgen”},{“x”:149,“y”:456,“width”:814,“height”:34,“text”:“NACH DEM SCHIFFSUNGLUCK IN SUDKOREA”}]}]}
Hi,
I am not sure about how the mashape GUI test works, if I just select am image and click on the “test endpoint” button, I also got the 500 error.
However, I tested the endpoint by using curl like this:
curl -X POST --include “https://semamediadata-image-ocr-v1.p.mashape.com/” -H “X-Mashape-Key: the mashap key here” -H “Content-Type: multipart/form-data” -F “file=@/Desktop/MyImage/test/15.jpg” -F “lang=en” -F “noempty=false” -F “outform=xml” -F “uc=True”
This responses:
HTTP/1.1 100 Continue
HTTP/1.1 202 ACCEPTED Allow: POST, PUT, OPTIONS Content-Language: en Content-Type: application/json Date: Tue, 17 Feb 2015 17:03:20 GMT Server: Mashape/5.0.6 Vary: Accept X-RateLimit-requests-Limit: 40000 X-RateLimit-requests-Remaining: 40000 Content-Length: 754 Connection: keep-alive
{“frames”:[{“framename”:“15_EDXvFyL”,“results”:[{“x”:94,“y”:676,“width”:869,“height”:35,“text”:">Krise in der Ukraine: Russland verteidigt Truppenstationierung an der Grenzregion"},{“x”:103,“y”:612,“width”:181,“height”:46,“text”:“® tagesschau”},{“x”:153,“y”:509,“width”:800,“height”:78,“text”:“Mehr als 30 Tote geborgen”},{“x”:149,“y”:456,“width”:814,“height”:34,“text”:“NACH DEM SCHIFFSUNGLUCK IN SUDKOREA”}]}]}
It works without any problem!
Best
HJ