情况1:如果你要是用postman做测试,可以设置postman http request time_out:
情况2:如果client也使用python写的,那直接修改HTTPRequest的_DEFAULTS中的参数即可。
或者通过构造一个request对象,然后进行设置:
1 http_client = httpclient.HTTPClient() 2 response = None 3 req = httpclient.HTTPRequest(url, request_timeout=time_out) 4 response = http_client.fetch(req) 5 r = response.body