HTTP Clients
The client
parameter of the Consumer
constructor offers a way
to swap out Requests with another HTTP client, including those listed here:
Requests
uplink.RequestsClient
Bases: HttpClientAdapter
A requests
client that returns
requests.Response
responses.
PARAMETER | DESCRIPTION |
---|---|
session
|
The session that should handle sending requests. If this argument is
omitted or set to
DEFAULT:
|
Source code in uplink/clients/requests_.py
Aiohttp
uplink.AiohttpClient
Twisted
uplink.TwistedClient
Bases: HttpClientAdapter
Client that returns [twisted.internet.defer.Deferred
][]
responses.
Note
This client is an optional feature and requires the [twisted
][]
package. For example, here's how to install this extra using pip:
PARAMETER | DESCRIPTION |
---|---|
session
|
The session
that should handle sending requests. If this argument is
omitted or set to
TYPE:
|