Top "Python-requests" questions

USE ONLY FOR THE PYTHON REQUESTS LIBRARY.

How do I get the IP address from a http request using the requests library?

I am making HTTP requests using the requests library in python, but I need the ip address from the server …

python python-requests pycurl httplib httplib2
Get HTTP Error code from requests.exceptions.HTTPError

I am catching exceptions like this, def get_url_fp(image_url, request_kwargs=None): response = requests.get(some_url, **…

python http exception python-requests
How to implement retry mechanism into python requests library?

I would like to add a retry mechanism to python request library, so scripts that are using it will retry …

python http python-requests
curl vs python "requests" when hitting APIs

I am trying to hit the Bitbucket API for my account, and a successful attempt looks like: curl --user screename:…

python curl python-requests bitbucket-api
Python client error 'Connection reset by peer'

I have written a very small python client to access confluence restful api. I am using https protocol to connect …

python python-requests confluence-rest-api
How to prevent python requests from percent encoding my URLs?

I'm trying to GET an URL of the following format using requests.get() in python: http://api.example.com/export/?…

python url python-requests percent-encoding
Unit testing a python app that uses the requests library

I am writing an application that performs REST operations using Kenneth Reitz's requests library and I'm struggling to find a …

python unit-testing testing mocking python-requests
Get file size using python-requests, while only getting the header

I have looked at the requests documentation, but I can't seem to find anything. How do I only request the …

python python-requests
Request returns bytes and I'm failing to decode them

Essentially I made a request to a website and got a byte response back: b'[{"geonameId:"703448"}..........'. I'm confused because …

python json byte python-requests decoding
Uploading multiple files in a single request using python requests module

The Python requests module provides good documentation on how to upload a single file in a single request: files = {'file': …

python-requests multiple-file-upload