http4k / org.http4k.core / MemoryResponse


data class MemoryResponse : Response (source)


Name Summary
<init> MemoryResponse(status: Status, headers: Headers = listOf(), body: Body = EMPTY, version: String = HTTP_1_1)


Name Summary
body val body: Body
headers val headers: Headers
status val status: Status
version val version: String


Name Summary
body fun body(body: Body): MemoryResponse
fun body(body: String): MemoryResponse
fun body(body: InputStream, length: Long?): MemoryResponse
(Copy &) sets the body content.
equals fun equals(other: Any?): Boolean
header fun header(name: String, value: String?): MemoryResponse
(Copy &) Adds a header value with this name.
headers fun headers(headers: Headers): MemoryResponse
(Copy &) Add all passed headers.
removeHeader fun removeHeader(name: String): MemoryResponse
(Copy &) remove headers with this name.
replaceHeader fun replaceHeader(name: String, value: String?): MemoryResponse
(Copy &) Adds a header value with this name, replacing any previously set values.
toString fun toString(): String

Inherited Functions

Name Summary
toMessage open fun toMessage(): String
Returns a formatted wire representation of this message.

Extension Functions

Name Summary
cookie fun Response.cookie(cookie: Cookie): Response
cookies fun Response.cookies(): List<Cookie>
invalidateCookie fun Response.invalidateCookie(name: String, domain: String? = null): Response
maxAge fun Response.maxAge(duration: Duration): Response
multipartIterator fun HttpMessage.multipartIterator(): Iterator<MultipartEntity>
mustRevalidate fun Response.mustRevalidate(): Response
noCache fun Response.noCache(): Response
noStore fun Response.noStore(): Response
onlyIfCached fun Response.onlyIfCached(): Response
private fun Response.private(): Response
public fun Response.public(): Response
removeCookie fun Response.removeCookie(name: String): Response
replaceCookie fun Response.replaceCookie(cookie: Cookie): Response
staleIfError fun Response.staleIfError(duration: Duration): Response
staleWhileRevalidate fun Response.staleWhileRevalidate(duration: Duration): Response
with fun <T> T.with(vararg modifiers: (T) -> T): T