#!/user/bin/env python
# -*-coding: utf-8 -*-i
mport requests
import json
#rep=requests.request("get",url="https://postman-echo.com/get?fool=barl&foo2=bar2")
par={"fool":"barl","foo2":"bar2"}
rep=requests.get(url="https://postman-echo.com/get",params=par)
print(rep.content)
rep1=requests.get("https://postman-echo.com/get?fool=barl&foo2=bar2")
print(rep1.content)
data={"fool":"barl","foo2":"bar2"}
rep4=requests.post("https://postman-echo.com/post",data=data)
print(rep4.text)
rep2=requests.request("post",url="https://postman-echo.com/post?fool=barl&foo2=bar2",data="this is data")
print(rep2.content)
print(type(rep2.content))
rep3=requests.post("https://postman-echo.com/post?fool=barl&foo2=bar2")
#取响应数据中值的方法
print(rep