api

http4k / org.http4k.core / MemoryResponse

MemoryResponse

data class MemoryResponse : Response (source)

Constructors

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

Properties

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

Functions

Name Summary
body fun body(body: Body): MemoryResponse
fun body(body: String): MemoryResponse
fun body(body: InputStream, length: Long?): MemoryResponse
equals fun equals(other: Any?): Boolean
header fun header(name: String, value: String?): MemoryResponse
headers fun headers(headers: Headers): MemoryResponse
removeHeader fun removeHeader(name: String): MemoryResponse
replaceHeader fun replaceHeader(name: String, value: String?): MemoryResponse
toString fun toString(): String

Inherited Functions

Name Summary
toMessage open fun toMessage(): String

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