Here is the code i used:
conn = httplib.HTTPSConnection('api.projectoxford.ai')
conn.request("POST", "/vision/v1.0/ocr?%s" % params,"{'Url':'my_url_xxxxxxxxxx'}", headers_1)
response = conn.getresponse()
data = response.read()
print(data)
This is the error I got:
{
"code":"InvalidImageUrl",
"requestId":"3e074556-dd52-4965-b250-e821b7fb6c27",
"message":"Image URL is not accessible."
}
Your payload needs to be properly cased:
"{'url':'https://s-media-cache-ak0.pinimg.com/originals/8c/1b/82/8c1b825d2d0750957098c8a4a879d53f.jpg'}"
, note lower-caseurl
, notUrl
.