Tag archive for: requests

How to get an Access Token to integrate with PayPal REST APIs in Python

Before you can integrate with PayPal via the REST APIs, you will need to obtain an access token.

Given that REST APIs is agnostic to programming languages, you can use a programming language of your choice to get the Access Token.

In case you are wondering how you can get an Access Token to integrate with PayPal REST APIs in Python, this is how you can do so.

How to send an HTTP request to a HTTP Basic Authentication endpoint in Python 3 with requests library

When you are building a Python 3 application for the Internet, you could encounter API endpoints that use HTTP Basic Authentication as the authentication mechanism.

In such a situation, using the requests library in your Python 3 code makes it easier to communicate with those endpoints.

In case you need to build a Python 3 application that sends HTTP request to a HTTP Basic Authentication endpoint, this is how you can do so with the requests library.

How to download a file via HTTP POST and HTTP GET with Python 3 requests library

When you are building a HTTP client with Python 3, you could be coding it to upload a file to a HTTP server or download a file from a HTTP server.

Previously, we discussed how to upload a file and some data through HTTP multipart in Python 3 using the requests library. In this post, let’s see how we can download a file via HTTP POST and HTTP GET.

How to upload a file and some data through HTTP multipart in Python 3 using the requests library

Undeniably, the HTTP protocol had become the dominant communication protocol between computers.

Through the HTTP protocol, a HTTP client can send data to a HTTP server. For example, a client can upload a file and some data from to a HTTP server through a HTTP multipart request.

If you are building that client with Python 3, then you can use the requests library to construct the HTTP multipart request easily.

In case you need it, this is how we can upload a file and some data through HTTP multipart in Python 3 using the requests library.