Skip to content

Instantly share code, notes, and snippets.

@techkuz
Created July 2, 2019 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techkuz/084f45a54c2b6d2f5dfcf08f5d10f3f0 to your computer and use it in GitHub Desktop.
Save techkuz/084f45a54c2b6d2f5dfcf08f5d10f3f0 to your computer and use it in GitHub Desktop.
Send request to azure inkrecognizer
import requests, json
subs_key = API_KEY
uri_base = 'https://api.cognitive.microsoft.com/inkrecognizer/v1.0-preview/recognize'
headers = {'Content-type': 'application/json',
"Ocp-Apim-Subscription-Key": subs_key}
body = {}
response =requests.request('PUT', uri_base, json=body, data=None, headers=headers)
print('Response:')
parsed =json.loads(response.text)
print(json.dumps(parsed, sort_keys=True, indent=2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment