api

http4k / org.http4k.routing / RoutedResponse

RoutedResponse

class RoutedResponse : Response

Constructors

Name Summary
<init> RoutedResponse(delegate: Response, xUriTemplate: UriTemplate)

Properties

Name Summary
xUriTemplate val xUriTemplate: UriTemplate

Functions

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

Extension Functions

Name Summary
alphabetiseHeaders fun <T : HttpMessage> T.alphabetiseHeaders(): T
asAzure fun Response.asAzure(request: HttpRequestMessage<Optional<String>>): HttpResponseMessage!
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
shouldHaveBody infix fun HttpMessage.shouldHaveBody(expected: Matcher<Body>): Unit
infix fun HttpMessage.shouldHaveBody(expected: Matcher<String?>): Unit
infix fun HttpMessage.shouldHaveBody(expected: String): Unit
infix fun HttpMessage.shouldHaveBody(expected: Regex): Unit
fun <T> HttpMessage.shouldHaveBody(lens: BodyLens<T>, matcher: Matcher<T>): Unit
shouldHaveContentType infix fun HttpMessage.shouldHaveContentType(expected: ContentType): Unit
shouldHaveHeader fun <T> HttpMessage.shouldHaveHeader(lens: HeaderLens<T>, matcher: Matcher<T>): Unit
fun HttpMessage.shouldHaveHeader(name: String, matcher: Matcher<String>): Unit
fun HttpMessage.shouldHaveHeader(name: String, expected: String): Unit
fun HttpMessage.shouldHaveHeader(name: String, expected: Regex): Unit
infix fun HttpMessage.shouldHaveHeader(name: String): Unit
fun HttpMessage.shouldHaveHeader(name: String, expected: List<String?>): Unit
shouldHaveSetCookie infix fun Response.shouldHaveSetCookie(expected: Cookie): Unit
fun Response.shouldHaveSetCookie(name: String, match: Matcher<Cookie>): Unit
shouldHaveStatus infix fun Response.shouldHaveStatus(expected: Status): Unit
shouldNotHaveBody infix fun HttpMessage.shouldNotHaveBody(expected: Matcher<Body>): Unit
infix fun HttpMessage.shouldNotHaveBody(expected: Matcher<String?>): Unit
infix fun HttpMessage.shouldNotHaveBody(expected: String): Unit
infix fun HttpMessage.shouldNotHaveBody(expected: Regex): Unit
fun <T> HttpMessage.shouldNotHaveBody(lens: BodyLens<T>, matcher: Matcher<T>): Unit
shouldNotHaveContentType infix fun HttpMessage.shouldNotHaveContentType(expected: ContentType): Unit
shouldNotHaveHeader fun <T> HttpMessage.shouldNotHaveHeader(lens: HeaderLens<T>, matcher: Matcher<T>): Unit
fun HttpMessage.shouldNotHaveHeader(name: String, matcher: Matcher<String>): Unit
fun HttpMessage.shouldNotHaveHeader(name: String, expected: String): Unit
fun HttpMessage.shouldNotHaveHeader(name: String, expected: Regex): Unit
infix fun HttpMessage.shouldNotHaveHeader(name: String): Unit
fun HttpMessage.shouldNotHaveHeader(name: String, expected: List<String?>): Unit
shouldNotHaveSetCookie infix fun Response.shouldNotHaveSetCookie(expected: Cookie): Unit
fun Response.shouldNotHaveSetCookie(name: String, match: Matcher<Cookie>): Unit
shouldNotHaveStatus infix fun Response.shouldNotHaveStatus(expected: Status): Unit
staleIfError fun Response.staleIfError(duration: Duration): Response
staleWhileRevalidate fun Response.staleWhileRevalidate(duration: Duration): Response
transferTo fun Response.transferTo(destination: HttpServletResponse): Unit
with fun <T : HttpMessage> T.with(vararg modifiers: (T) -> T): T