Skip to content

Commit 303eec0

Browse files
committed
Merge remote-tracking branch 'oauth2cli' into backward-compatibility
2 parents 1b0c7bd + 9b9018d commit 303eec0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

msal/oauth2cli/http.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ class HttpClient(object):
1111
def post(self, url, params=None, data=None, headers=None, **kwargs):
1212
"""HTTP post.
1313
14-
params, data and headers MUST accept a dictionary.
14+
:param dict params: A dict to be url-encoded and sent as query-string.
15+
:param dict headers: A dict representing headers to be sent via request.
16+
:param data:
17+
Implementation needs to support 2 types.
18+
19+
* A dict, which will need to be urlencode() before being sent.
20+
* (Recommended) A string, which will be sent in request as-is.
21+
1522
It returns an :class:`~Response`-like object.
1623
1724
Note: In its async counterpart, this method would be defined as async.
@@ -21,7 +28,9 @@ def post(self, url, params=None, data=None, headers=None, **kwargs):
2128
def get(self, url, params=None, headers=None, **kwargs):
2229
"""HTTP get.
2330
24-
params, data and headers MUST accept a dictionary.
31+
:param dict params: A dict to be url-encoded and sent as query-string.
32+
:param dict headers: A dict representing headers to be sent via request.
33+
2534
It returns an :class:`~Response`-like object.
2635
2736
Note: In its async counterpart, this method would be defined as async.

0 commit comments

Comments
 (0)