【发布时间】:2016-11-01 13:58:03
【问题描述】:
我不知道我把test1.jpg 和test2.jpg 放在哪里了。
我多次更改此代码,但我不能...
{"error":{"code":"BadArgument","message":"Request body is invalid."}}
import httplib, urllib, base64
headers = {
# Request headers
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '',
}
params = urllib.urlencode({
})
try:
conn = httplib.HTTPSConnection('api.projectoxford.ai')
conn.request("POST", "/face/v1.0/verify?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
【问题讨论】:
标签: python python-2.7 image-recognition microsoft-cognitive face