Questions tagged [python-requests-json]
13 questions
1
vote
0 answers
Python requests 2.31.0 with urllib3 >= version 2 not automatically decompressing gzip responses
Been relying on requests' ability to auto-decompress responses for a long time now, as per https://docs.python-requests.org/en/latest/community/faq/#encoded-data
However, I'm having a new problem in that it seems that when urllib3 v2 or greater is…

Jon
- 952
- 1
- 11
- 17
0
votes
0 answers
Requests PUT method doesn't send keys properly
I'm trying to create a PUT request using the lib requests. The request is working properly when i send the data through POSTMAN, but it doesn't work with Python requests.
Here's what i've tried:
jsn = {'key 1' :'item 01', 'key 2' :'item 02', 'key 3'…

matheusppedroso
- 39
- 3
0
votes
0 answers
Getting error while post request in sheety for adding a row
I am trying to post a request to add a row in sheety. I am facing two problems.
1 st part -
**A valid 'Authorization' header is required to access this API." **
What should be included while giving header, api_key,api_id,Content_type,Authorization…

Shashank Tyagi
- 1
- 1
0
votes
0 answers
How can I access the datasets or endpoints of a product I subscribed to on AWS marketplace without AccessID?
I recently subscribed to the SimilarWeb API on the AWS Data Exchange Marketplace but have been unable to access the datasets. The reason is: send_api_asset call requires an AssetID parameter just as used in this sample notebook however, it is not…

Mustapha Unubi Momoh
- 125
- 1
- 9
0
votes
0 answers
Stream a Partial HTTPResponse in Python
I am trying to receive only partial data from a request. The server does not respond to the Range header.
I have attempted the following:
def get_data(change_id):
url = "https://my-api.com?id={}".format(change_id)
r = requests.get(url,…

Titan Chase
- 101
- 1
- 6
0
votes
0 answers
Error when trying to query the json, but I always get the same error ERROR - 'meta'
{
"droplets": [],
"links": {},
"meta": {
"total": 3
}
I would like to receive this 'total: 3', through json, I tried this way
totals = droplet_response.json()
tt = totals['meta']['total']
and he returned this to me
ERROR - 'meta'

Horus
- 3
- 2
0
votes
0 answers
how to use python requests to upload file?
import requests
cookies = {
'root_session_id': 'something',
'visid_incap_987752': 'something',
'_gid': 'something',
#there are more cookies but I dont wanna post all of them for safety reasons and I changed
#the values for…

trin cjon
- 29
- 3
0
votes
0 answers
When i try to make a http request it shows up as a connection error whereas before it didn't show up as a connection error
import json
import requests
country = 'GB'
url = ('http://kitkabackend.eastus.cloudapp.azure.com:5010/highscore/crowns/list?country='+country)
r = requests.get(url)
print(r.text)
The same code was working for me for a while before but now it…
0
votes
2 answers
python > requests module > post > headers not working
Why I'm getting a response like this? I tried to ask people on Discord and no one could explain.
>>>import requests
>>>api_url = "my_url"
>>>headers = {"Content-type": "application/json"}
>>>res = requests.post(api_url, "text to post",…

AhMeD PS4
- 3
- 2
0
votes
0 answers
python Requests library showing no data
Could you please help me with this.
I am struggling to get data with the Requests library.
import requests
payload = {'company':'USA', 'employeeid':'EMP1235'};
headers= {
"Content-Type": 'application/json',
…

Chakra
- 647
- 1
- 8
- 16
0
votes
2 answers
API JSON result to file
I'm retrieving data from an API, but can not get it to save to a file.
import requests
import json
response = requests.get(f'url', headers={'CERT': 'cert'})
response = response.json()
When I run response or respons.json() I can see the data that I…

Sai sei
- 141
- 1
- 10
0
votes
1 answer
Python requests.get does not take field names for data
I need to generate data using the below url via requests.get :
fields = ("")
response_2 = requests.get(BASEURL + 'services/v17.0/report-jobs/' + jobId + "?fields=" +fields ,
headers = header_param)
For the purpose of the question, both the BASEURL…

user10
- 187
- 2
- 11
-2
votes
1 answer
PlayerDB API Post Requests bring 404
I made a little script to get the UUID's of people who joined my minecraft server, then run them through the PlayerDB API through a post request to: https://playerdb.co/api/player/minecraft/* where the * is a player UUID, however it returns random…

zoltan
- 3
- 4