@fbald Could you print the response.headers
field? This should give you the operation location.
If an answer is helpful, please click on or upvote
which might help other community members reading this thread.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using the form recognizer REST API and when I use cURL with the command line, I have no issue with the POST and GET requests as I am given the operation location from the POST output to then use in the GET request. However, I am trying to use the tool in bulk, and thus I am using the requests library in python. I am receiving the 202 accepted response, which as I've been reading online seems to be correct with this tool. The issue is that I am getting nothing back in the content of the request and thus I have now operation location to complete the GET request. Am I missing anything? Thanks for the help!
@fbald Could you print the response.headers
field? This should give you the operation location.
If an answer is helpful, please click on or upvote
which might help other community members reading this thread.
hi fbald,
Here's a basic python script which includes a POST request.
Does this syntax help at all?
import requests
url = 'https://www.example.com/post'
payload = {
'key1': 'value1',
'key2': 'value2'
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
r = requests.post(url, data=payload, headers=headers)
print(r.text)