Skip to main content

All Questions

0 votes
1 answer
110 views

Unexpected response from Converting from curl to python request.post

I am trying to implement a working curl call into Python3.8. curl -H application/x-www-form-urlencoded --silent -d "client_id=bob&client_secret=djfheucnjdi54ndjdjddkdjs&grant_type=...
New2Python's user avatar
0 votes
1 answer
990 views

Curl giving error 411 when calling Azure DevOps API

I have tried various values for the Content-Length, Tried removing it altogether, setting it at 0, however, I still end up with the same message, not really sure what is causing this. The token is a ...
Abhishek Rai's user avatar
  • 2,247
1 vote
1 answer
570 views

How to rewrite POST request from python to C++ with curl

I have POST request on python with a lot of settings, and I don't uderstand how their look like in curl. data_str = '{' + '"username": "{}", "domain_id": {}, "password": {}'.format(login, domain_id, ...
Hedgehog's user avatar
0 votes
1 answer
98 views

Curl works but python requests is failing to upload an image

curl 'https://example.com/v2/' -F '[email protected];type=image/JPEG' -H 'X-Generate-Renditions: all' -H 'X-Create-Asset-Sync: 1' -H 'Authorization: Bearer xyz' -H 'X-Read-Meta: none' works without a ...
deppfx's user avatar
  • 751
0 votes
2 answers
375 views

post request rewrite from curl to python requests

Why my post request via os.system('''curl ... ''') works correctly, and the 'requests' analogue does not? import requests ..... headers = {'content-type': 'application/x-www-form-urlencoded'} r = ...
lvcpp's user avatar
  • 169
0 votes
0 answers
328 views

convert curl command to python [pycurl or request or anythings!]

I`m try to post a data to specific url and get response and save it in the file with curl and no problem with it. This webpage post a data and if data is correct show response webpage, and if not ...
The Alien's user avatar