Add headers to request
Execute GET for http and retrieve file for FTP. You have to provide at least uri. All other arguments should conform to HTTPRequest.get or FTPRequest.get depending on the URI scheme. When arguments do not conform scheme (for example you try to call get("ftp://somehost.net/pub/README", {"a":"b"}) which doesn't make sense) you will receive Exception("Operation not supported for ftp")
Execute POST for http and STOR file for FTP. You have to provide uri and data. Data should conform to HTTPRequest.post or FTPRequest.post depending on the URI scheme. When arguments do not conform scheme you will receive Exception("Operation not supported for ftp")
Set authenticator for http requests. v - Auth instance.
Set IO buffer size for http and ftp requests v - buffer size in bytes.
get contentLength of the responce
get length og actually received content. this value increase over time, while we receive data
Set Cookie for http requests. v - array of cookie.
Get Cookie for http requests. v - array of cookie.
Set http keepAlive value v - use keepalive requests - true, or not - false
Set maximum content lenth both for http and ftp requests v - maximum content length in bytes. When limit reached - throw RequestException
Set maximum length for HTTP headers v - maximum length of the HTTP response. When limit reached - throw RequestException
Set limit on HTTP redirects v - limit on redirect depth
set proxy property. v - full url to proxy.
Set timeout on IO operation. v - timeout value
set "streaming" property
Set verbosity for HTTP or FTP requests. v - verbosity level (0 - no output, 1 - headers to stdout, 2 - headers and body progress to stdout). default = 0.
This is simplest interface to both http and ftp protocols. Request has methods get, post and exec which routed to proper concrete handler (http or ftp, etc). To enable some protocol-specific featutes you have to use protocol interface directly (see docs for HTTPRequest or FTPRequest)