mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Edit SimpleHttpClient to reference that header keys can be passed as str or bytes (#6077)
This commit is contained in:
parent
8f90b0ee48
commit
f3451118a6
1
changelog.d/6077.misc
Normal file
1
changelog.d/6077.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Edit header dicts docstrings in SimpleHttpClient to note that `str` or `bytes` can be passed as header keys.
|
@ -327,7 +327,7 @@ class SimpleHttpClient(object):
|
|||||||
Args:
|
Args:
|
||||||
uri (str):
|
uri (str):
|
||||||
args (dict[str, str|List[str]]): query params
|
args (dict[str, str|List[str]]): query params
|
||||||
headers (dict[str, List[str]]|None): If not None, a map from
|
headers (dict[str|bytes, List[str|bytes]]|None): If not None, a map from
|
||||||
header name to a list of values for that header
|
header name to a list of values for that header
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -371,7 +371,7 @@ class SimpleHttpClient(object):
|
|||||||
Args:
|
Args:
|
||||||
uri (str):
|
uri (str):
|
||||||
post_json (object):
|
post_json (object):
|
||||||
headers (dict[str, List[str]]|None): If not None, a map from
|
headers (dict[str|bytes, List[str|bytes]]|None): If not None, a map from
|
||||||
header name to a list of values for that header
|
header name to a list of values for that header
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -414,7 +414,7 @@ class SimpleHttpClient(object):
|
|||||||
None.
|
None.
|
||||||
**Note**: The value of each key is assumed to be an iterable
|
**Note**: The value of each key is assumed to be an iterable
|
||||||
and *not* a string.
|
and *not* a string.
|
||||||
headers (dict[str, List[str]]|None): If not None, a map from
|
headers (dict[str|bytes, List[str|bytes]]|None): If not None, a map from
|
||||||
header name to a list of values for that header
|
header name to a list of values for that header
|
||||||
Returns:
|
Returns:
|
||||||
Deferred: Succeeds when we get *any* 2xx HTTP response, with the
|
Deferred: Succeeds when we get *any* 2xx HTTP response, with the
|
||||||
@ -438,7 +438,7 @@ class SimpleHttpClient(object):
|
|||||||
None.
|
None.
|
||||||
**Note**: The value of each key is assumed to be an iterable
|
**Note**: The value of each key is assumed to be an iterable
|
||||||
and *not* a string.
|
and *not* a string.
|
||||||
headers (dict[str, List[str]]|None): If not None, a map from
|
headers (dict[str|bytes, List[str|bytes]]|None): If not None, a map from
|
||||||
header name to a list of values for that header
|
header name to a list of values for that header
|
||||||
Returns:
|
Returns:
|
||||||
Deferred: Succeeds when we get *any* 2xx HTTP response, with the
|
Deferred: Succeeds when we get *any* 2xx HTTP response, with the
|
||||||
@ -482,7 +482,7 @@ class SimpleHttpClient(object):
|
|||||||
None.
|
None.
|
||||||
**Note**: The value of each key is assumed to be an iterable
|
**Note**: The value of each key is assumed to be an iterable
|
||||||
and *not* a string.
|
and *not* a string.
|
||||||
headers (dict[str, List[str]]|None): If not None, a map from
|
headers (dict[str|bytes, List[str|bytes]]|None): If not None, a map from
|
||||||
header name to a list of values for that header
|
header name to a list of values for that header
|
||||||
Returns:
|
Returns:
|
||||||
Deferred: Succeeds when we get *any* 2xx HTTP response, with the
|
Deferred: Succeeds when we get *any* 2xx HTTP response, with the
|
||||||
@ -516,7 +516,7 @@ class SimpleHttpClient(object):
|
|||||||
Args:
|
Args:
|
||||||
url (str): The URL to GET
|
url (str): The URL to GET
|
||||||
output_stream (file): File to write the response body to.
|
output_stream (file): File to write the response body to.
|
||||||
headers (dict[str, List[str]]|None): If not None, a map from
|
headers (dict[str|bytes, List[str|bytes]]|None): If not None, a map from
|
||||||
header name to a list of values for that header
|
header name to a list of values for that header
|
||||||
Returns:
|
Returns:
|
||||||
A (int,dict,string,int) tuple of the file length, dict of the response
|
A (int,dict,string,int) tuple of the file length, dict of the response
|
||||||
|
Loading…
Reference in New Issue
Block a user