classafButter::ButterRequest
sys::Obj afButter::ButterRequest
The HTTP request.
- body
Body body := ...
The request body.
- dump
Str dump(Bool dumpBody := true)
Dumps a debug string that in some way resembles the full HTTP request.
- headers
HttpRequestHeaders headers := HttpRequestHeaders.<ctor>() { private set }
The HTTP headers to use for the next request. This map uses case insensitive keys.
- make
- method
Str method := "GET"
HTTP method to use for request. Defaults to "GET".
- normaliseHost
static Str normaliseHost(Uri url)
Returns a normalised host string from a URL.
- setHeader
This setHeader(Str name, Str? value)
Builder method for setting a header value.
- setMethod
Builder method for setting the HTTP method.
- stash
A temporary store for request data, use to pass data between middleware.
- url
Uri url
Url to use for request.
- version
Version version := Butter.http11
HTTP version to use for request. Defaults to HTTP 1.1
- writeMultipartForm
This writeMultipartForm(|MultipartForm formFunc)
Writes a Multipart Form to the body. Use to simulate file uploads.
request.writeMultipartForm |MultipartForm form| { form.writeJsonObj("meta", ["desc":"Awesome!"]) form.writeFile("upload", `newGame.pod`.toFile) }