Http client with base_url base on requests
Project description
requests-base-url
Http client with base_url base on requests
Install
pip install requests-base-url
Simple Use
from requests_base_url import http
resp = http.get('https://httpbin.org/get?a=1&b=2')
print(resp)
Config base_url
from requests_base_url import HTTP
http = HTTP(basse_url='https://httpbin.org')
resp = http.get('/get?a=1&b=2')
print(resp)
resp = http.post('/post', data=dict(a=1, b=2))
print(resp)
Config default Headers, Params or Proxies
from requests_base_url import HTTP
http = HTTP(basse_url='https://httpbin.org', headers={"token": "xxx"})
resp = http.get('/get?a=1&b=2')
print(resp)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.