💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
#### GET ``` http = urllib3.PoolManager() header = { 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' } res = http.request("GET", "http://www.baidu.com/s?", fields={'wd':'hello'}, headers=header) print(res.status) print(res.data.decode()) ``` #### POST ``` http = urllib3.PoolManager() header = { 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' } res = http.request("POST", "http://www.baidu.com/s?", fields={'wd':'hello'}, headers=header) print(res.status) print(res.data.decode()) ```