requests extension for noseapp lib
Project description
Requests/Requests-Oauthlib extension for NoseApp library
Installation
pip install noseapp_requests
Usage
from noseapp.ext.requests import RequestsEx, make_config endpoint = make_config() endpoint.configure( base_url='http://httpbin.org/', key='httpbin' ) endpoint.session_configure( always_return_json=True, raise_on_http_error=True ) requests_ex = RequestsEx(endpoint) api = requests_ex.get_endpoint_session('httpbin', auth=('user', 'pass')) api.get('basic-auth/user/pass') api.get('get', key1='val1') # GET with query-string parameters api.post('post', key1='val1') # POST form-encoded data api.post('post', {'key1': 'val1'}) # POST JSON data api.get('status/400') # raises HTTPError
Documentation
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.
Source Distribution
noseapp_requests-0.0.1.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for noseapp_requests-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98be34b1f4810b8d858f6cd1383ec316b2668adecbe07ce07e559275069d55c7 |
|
MD5 | dc0b3ebda70fb6c5133aaa8117b3214e |
|
BLAKE2b-256 | 012471ee426e27b33f2ef1d8ae397ad56c37777cf648e731a765d2fedca511e6 |