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.
bodymay either be aStror 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.
bodymay either be aStror aBuf.- statusCode
Int statusCodeThe HTTP status code.
- statusMsg
Str statusMsgThe HTTP status message.
- version
Version version := Butter.http11HTTP version of the response.