classafButter::ButterRequest

sys::Obj
  afButter::ButterRequest

The HTTP request.

body

Source

Buf body := Buf.<ctor>()

The request body.

headers

Source

HttpRequestHeaders headers := HttpRequestHeaders.<ctor>()

The HTTP headers to use for the next request. This map uses case insensitive keys.

make

Source

new make(Uri url, |This? f := null)

method

Source

Str method := "GET"

HTTP method to use for request. Defaults to "GET".

setBodyFromJson

Source

This setBodyFromJson(Obj jsonObj)

Sets the body to the given JSON object.

Convenience for butterRequest.body = JsonOutStream.writeJsonToStr(jsonObj).toBuf

setBodyFromStr

Source

This setBodyFromStr(Str str)

Sets the body to the given string.

Convenience for butterRequest.body = str.toBuf

stash

Source

Str:Obj stash := ...

A temporary store for request data, use to pass data between middleware.

url

Source

Uri url

Url to use for request.

version

Source

Version version := Butter.http11

HTTP version to use for request. Defaults to HTTP 1.1