1 import requests
2
3 response = requests.get('http://www.baidu.com/')
4 print(type(response))
5 print(response.status_code)
6 print(type(response.text))
7 print(response.text)
8 print(response.cookies)
1 import requests
2
3 response = requests.post('http://www.baidu.com/')
4 requests.put('http://www.baidu.com/put')
5 requests.delete('http://www.baidu.com/delete')
6 requests.head('http://www.baidu.com/get')
7 requests.options('http://www.baidu.com/get')
8