classafButter::ButterResponse
sys::Obj afButter::ButterResponse
The HTTP response.
- body
Body body { private set }
The request body.
- data
A temporary store for request data, use to pass data between middleware.
- dump
Str dump(Bool dumpBody := true)
Dumps a debug string that in some way resembles the full HTTP response.
- headers
HttpResponseHeaders headers { private set }
The HTTP repsonse headers.
- make
new make(Int statusCode, [Str:Str]? headers := null, Obj? body := null)
Create a response.
body
may either be aStr
or aBuf
.This is a convenience ctor suitable for most applications.
- makeFromInStream
new makeFromInStream(InStream in)
Creates a response reading real HTTP values from an
InStream
. Note the whole response body is read in.- makeWithHeaders
new makeWithHeaders(Int statusCode, HttpResponseHeaders headers, Obj? body := null)
Create a response.
body
may either be aStr
or aBuf
.- statusCode
Int statusCode
The HTTP status code.
- statusMsg
Str statusMsg
The HTTP status message.
- version
Version version := Butter.http11
HTTP version of the response.