classafButter::ButterRequest
sys::Obj afButter::ButterRequest
The HTTP request.
- body
Buf body := Buf.<ctor>()
The request body.
- headers
HttpRequestHeaders headers := HttpRequestHeaders.<ctor>()
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".
- setBodyFromJson
This setBodyFromJson(Obj jsonObj)
Sets the body to the given JSON object.
Convenience for
butterRequest.body = JsonOutStream.writeJsonToStr(jsonObj).toBuf
- setBodyFromStr
Sets the body to the given string.
Convenience for
butterRequest.body = str.toBuf
- 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