上传者: 38683193
|
上传时间: 2021-11-12 10:20:35
|
文件大小: 29KB
|
文件类型: -
首先我们先引入requests模块
import requests
一、发送请求
r = requests.get('https://api.github.com/events') # GET请求
r = requests.post('http://httpbin.org/post', data = {'key':'value'}) # POST请求
r = requests.put('http://httpbin.org/put', data = {'key':'value'}) # PUT请求
r = requests.delete('http://httpbin.org/delete