twilio.http package¶
Submodules¶
twilio.http.http_client module¶
-
class
twilio.http.http_client.TwilioHttpClient(pool_connections=True, request_hooks=None, timeout=None, logger=<Logger twilio.http_client (WARNING)>, proxy=None, max_retries=None)[source]¶ Bases:
twilio.http.HttpClientGeneral purpose HTTP Client for interacting with the Twilio API
-
request(method, url, params=None, data=None, headers=None, auth=None, timeout=None, allow_redirects=False)[source]¶ Make an HTTP Request with parameters provided.
Parameters: - method (str) – The HTTP method to use
- url (str) – The URL to request
- params (dict) – Query parameters to append to the URL
- data (dict) – Parameters to go in the body of the HTTP request
- headers (dict) – HTTP Headers to send with the request
- auth (tuple) – Basic Auth arguments
- timeout (float) – Socket/Read timeout for the request
- allow_redirects (boolean) – Whether or not to allow redirects
See the requests documentation for explanation of all these parameters
Returns: An http response Return type: A Responseobject
-
twilio.http.request module¶
twilio.http.response module¶
twilio.http.validation_client module¶
-
class
twilio.http.validation_client.ValidationClient(account_sid, api_key_sid, credential_sid, private_key, pool_connections=True)[source]¶ Bases:
twilio.http.HttpClient-
request(method, url, params=None, data=None, headers=None, auth=None, timeout=None, allow_redirects=False)[source]¶ Make a signed HTTP Request
Parameters: - method (str) – The HTTP method to use
- url (str) – The URL to request
- params (dict) – Query parameters to append to the URL
- data (dict) – Parameters to go in the body of the HTTP request
- headers (dict) – HTTP Headers to send with the request
- auth (tuple) – Basic Auth arguments
- timeout (float) – Socket/Read timeout for the request
- allow_redirects (boolean) – Whether or not to allow redirects
See the requests documentation for explanation of all these parameters
Returns: An http response Return type: A Responseobject
-
-
class
twilio.http.validation_client.ValidationPayload(method, path, query_string, all_headers, signed_headers, body)¶ Bases:
tuple-
all_headers¶ Alias for field number 3
-
body¶ Alias for field number 5
-
method¶ Alias for field number 0
-
path¶ Alias for field number 1
-
query_string¶ Alias for field number 2
-
signed_headers¶ Alias for field number 4
-