These are the main options accepted by send_request_cgi / request_cgi. The sources are Rex::Proto::Http::Client#request_raw / #request_cgi and HttpClient itself.
Key Type Meaning Typical default methodString HTTP method GETuriString Path Effectively required versionString HTTP version 1.1protoString Protocol name HTTPvhostString Host header datastore VHOST / rhost rhostString Override connection host datastore rportInteger Override connection port datastore SSLBool Override TLS setting datastore agentString User-Agent datastore UserAgent connectionString Connection header encodeBool Encode the URI itself falsepartialBool Return incomplete responses too false
Key Type Meaning vars_getHash Query parameters vars_postHash Form POST parameters vars_form_dataArray<Hash> Multipart field array vars_form_data_boundaryString Multipart boundary (normally automatic) queryString Raw query string (alternative to vars_get) dataString Raw body ctypeString Content-Type encode_paramsBool URI-encode GET / POST parameters (defaults to true)
Key Type Meaning headersHash Additional headers raw_headersString Raw header string authorizationString Authorization header value cookieString / HttpCookieJar Cookie header keep_cookiesBool Add Set-Cookie values to the cookie jar expire_cookiesBool Remove expired entries from the cookie jar before use (enabled by default; disable with false) username / passwordString Client authentication credentials (on connection) preferred_authString Basic / Digest / NTLM / Kerberos / Negotiate / None
These take effect as module options rather than entries in the request Hash.
Option Effect HttpUsername / HttpPasswordUser credentials for the connection HttpClientTimeoutTimeout in seconds HttpTrace / HttpTraceHeadersOnlyDebug output HttpRawHeadersExtra headers file using an ERB template UserAgentDefault User-Agent DOMAINNTLM / Kerberos HTTP::AuthAuthentication method HTTP::uri_encode_mode and othersEvasion settings
' vars_get ' => { ' a ' => ' 1 ' } ,
' headers ' => { ' Accept ' => ' text/plain ' } ,