seguro.commands.notifier.main.AttachHTTP¶
- class seguro.commands.notifier.main.AttachHTTP(url, verify_certificate=True)[source]¶
Bases:
AttachHTTP- __init__(url, verify_certificate=True)[source]¶
Initialize HTTP Object
headers can be a dictionary of key/value pairs that you want to additionally include as part of the server headers to post with
Methods
__init__(url[, verify_certificate])Initialize HTTP Object
download(**kwargs)Perform retrieval of the configuration based on the specified request
escape_html(html[, convert_new_lines, ...])Takes html text as input and escapes it so that it won't
exists([retrieve_if_missing])Simply returns true if the object has downloaded and stored the attachment AND the attachment has not expired.
http_response_code_lookup(code[, response_mask])Parses the interger response code returned by a remote call from a web request into it's human readable string version.
invalidate()Close our temporary file
parse_list(content[, allow_whitespace, unquote])A wrapper to utils.parse_list() with unquoting support
parse_phone_no(content[, unquote])A wrapper to utils.parse_phone_no() with unquoting support
parse_url(url)Parses the URL and returns enough arguments that can allow us to re-instantiate this object.
post_process_parse_url_results(results)After parsing the URL, this function applies a bit of extra logic to support extra entries like pass becoming password, etc
pprint(content[, privacy, mode, quote, ...])Privacy Print is used to mainpulate the string before passing it into part of the URL.
quote(content[, safe, encoding, errors])Replaces single character non-ascii characters and URI specific ones by their %xx code.
schemas()A simple function that returns a set of all schemas associated with this object based on the object.protocol and object.secure_protocol
split_path(path[, unquote])Splits a URL up into a list object.
throttle([last_io, wait])A common throttle control
unquote(content[, encoding, errors])Replace %xx escapes by their single-character equivalent.
url([privacy])Returns the URL built dynamically based on specified arguments.
url_parameters(*args, **kwargs)Provides a default set of args to work with.
urlencode(query[, doseq, safe, encoding, errors])Convert a mapping object or a sequence of two-element tuples
Attributes
app_descapp_idapp_urlchunk_sizelocationloggermax_detect_buffer_sizemax_file_sizemimetypeReturns mime type (if one is present).
nameReturns the filename
pathReturns the absolute path to the filename.
protocolrequest_authThis is primarily used to fullfill the auth keyword argument that is used by requests.get() and requests.put() calls.
request_rate_per_secrequest_timeoutThis is primarily used to fullfill the timeout keyword argument that is used by requests.get() and requests.put() calls.
request_urlAssemble a simple URL that can be used by the requests library
secure_protocolservice_namesocket_connect_timeoutsocket_read_timeoutstricttagstemplate_argstemplate_kwargstemplate_tokenstemplatesunknown_filenameunknown_filename_extensionunknown_mimetypeverify_certificate