pub enum HttpItem {
Show 15 variants
Method(HttpMethod),
Path(String),
Timeout(String),
FollowRedirect(bool),
VerifySsl(bool),
Proxy(String),
UserAgent(String),
Header {
name: String,
value: String,
},
Cookie {
name: String,
value: String,
},
Query {
name: String,
value: String,
},
Data(ObjectBody),
Json(ObjectBody),
Raw(String),
BodyBytes(String),
Multipart(ObjectBody),
}Expand description
One setting inside an http block.
Items appear in source order and are folded into the runtime’s
HttpRequestSpec by the compiler. Anything not stated falls back to the
executor’s configuration.
Variants§
Method(HttpMethod)
method GET — the request method. Defaults to GET.
Path(String)
path "/…" — the request path, resolved against the scan target.
Timeout(String)
timeout "5s" — a per-probe timeout.
FollowRedirect(bool)
follow_redirect true|false — whether to follow redirects.
VerifySsl(bool)
verify_ssl true|false — whether to verify the TLS certificate.
Proxy(String)
proxy "…" — route this probe through a proxy.
UserAgent(String)
user_agent "…" — override the User-Agent.
Header
header "<name>" "<value>" — add a request header.
Cookie
cookie "<name>" "<value>" — add a request cookie.
Query
query "<name>" "<value>" — add a query-string parameter.
Data(ObjectBody)
data { … } — a form-urlencoded body.
Json(ObjectBody)
json { … } — a JSON body.
Raw(String)
raw "…" — a body sent verbatim.
BodyBytes(String)
body_bytes "aabbcc" — a hex-encoded binary body.
Multipart(ObjectBody)
multipart { … } — a multipart/form-data body.