We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3541c71 commit 0dac5d8Copy full SHA for 0dac5d8
1 file changed
python_requests.py
@@ -116,7 +116,7 @@
116
print(r.cookies["example_cookie_name"]) # "example_cookie_value"
117
118
# 要想发送你的cookies到服务器, 可以使用cookies参数(一个字典)
119
-cookies = dict(cookies_are="working")
+cookies = {"cookies_are": "working"}
120
r = requests.get("http://httpbin.org/cookies", cookies=cookies)
121
print(r.text)
122
@@ -207,7 +207,6 @@
207
with open("massive-body") as f:
208
requests.post("http://some.url/streamed", data=f)
209
210
-
211
# 事件挂钩, 可用的钩子: response(从一个请求产生的响应)
212
# 你可以通过传递一个 {hook_name: callback_function} 字典给 hooks 请求参数为每个请求分配一个钩子函数
213
def print_url(resp):
0 commit comments