ciecplib.requests module
HTTP request method with end-to-end ECP authentication
- ciecplib.requests.get(url, **kwargs)
Send a GET request using ECP authentication.
- Parameters:
url (
str) – URL path for request.endpoint (
str, optional) – ECP endpoint name or URL for request.username (
str, optional) – the username with which to authenticate, will be prompted for if not given, and not usingkerberos.password (
str, optional) – the password with which to authenticate, will be prompted for if not given, and not usingkerberos.kerberos (
bool, optional) – use existing kerberos credential for login, default is to try, but fall back to username/password prompt.cookiejar (
http.cookiejar.CookieJar, optional) – a jar of cookies to add to therequests.Session.kwargs – other keyword arguments are passed directly to
requests.Session.get()
- Returns:
response (
http.client.HTTPResponse) – the response from the URL
See also
requests.Session.getfor full details of the request handling
- ciecplib.requests.head(url, **kwargs)
Send a HEAD request using ECP authentication.
- Parameters:
url (
str) – URL path for request.endpoint (
str, optional) – ECP endpoint name or URL for request.username (
str, optional) – the username with which to authenticate, will be prompted for if not given, and not usingkerberos.password (
str, optional) – the password with which to authenticate, will be prompted for if not given, and not usingkerberos.kerberos (
bool, optional) – use existing kerberos credential for login, default is to try, but fall back to username/password prompt.cookiejar (
http.cookiejar.CookieJar, optional) – a jar of cookies to add to therequests.Session.kwargs – other keyword arguments are passed directly to
requests.Session.head()
- Returns:
response (
http.client.HTTPResponse) – the response from the URL
See also
requests.Session.headfor full details of the request handling
- ciecplib.requests.post(url, **kwargs)
Send a POST request using ECP authentication.
- Parameters:
url (
str) – URL path for request.endpoint (
str, optional) – ECP endpoint name or URL for request.username (
str, optional) – the username with which to authenticate, will be prompted for if not given, and not usingkerberos.password (
str, optional) – the password with which to authenticate, will be prompted for if not given, and not usingkerberos.kerberos (
bool, optional) – use existing kerberos credential for login, default is to try, but fall back to username/password prompt.cookiejar (
http.cookiejar.CookieJar, optional) – a jar of cookies to add to therequests.Session.kwargs – other keyword arguments are passed directly to
requests.Session.post()
- Returns:
response (
http.client.HTTPResponse) – the response from the URL
See also
requests.Session.postfor full details of the request handling