Package | Description |
---|---|
bayou.file |
Utilities for files.
|
bayou.html |
For building html trees.
|
bayou.http |
Http server.
|
Modifier and Type | Method and Description |
---|---|
HttpResponseImpl |
StaticHandler.handle(HttpRequest request)
Try to serve the request with a file response.
|
Modifier and Type | Method and Description |
---|---|
default HttpResponseImpl |
HtmlDoc.toResponse(int statusCode)
Create an http response serving this document.
|
Modifier and Type | Method and Description |
---|---|
static HttpResponseImpl |
HttpResponse.cache(HttpResponse response)
Cache the response in memory, particularly the body.
|
HttpResponseImpl |
HttpResponseImpl.cookie(Cookie cookie)
Add a cookie.
|
HttpResponseImpl |
HttpResponseImpl.cookie(String name,
String value,
Duration maxAge)
Add a cookie.
|
static HttpResponseImpl |
HttpResponse.data(int statusCode,
String contentType,
byte[] data)
Create a response with `data` as the body.
|
HttpResponseImpl |
HttpResponseImpl.entity(HttpEntity entity)
Set the entity.
|
HttpResponseImpl |
HttpResponseImpl.entityEtag(String etag)
Set the entity
"etag" property. |
HttpResponseImpl |
HttpResponseImpl.entityEtagIsWeak(boolean etagIsWeak)
Set the entity
"etagIsWeak" property. |
HttpResponseImpl |
HttpResponseImpl.entityExpires(Instant expires)
Set the entity
"expires" property. |
HttpResponseImpl |
HttpResponseImpl.entityLastModified(Instant lastModified)
Set the entity
"lastModified" property. |
static HttpResponseImpl |
HttpResponse.gzip(HttpResponse response)
Compress the response with "gzip".
|
HttpResponseImpl |
HttpResponseImpl.header(String name,
String value)
Set a header.
|
static HttpResponseImpl |
HttpResponse.html(int statusCode,
CharSequence... htmlContent)
Create a
"text/html;charset=UTF-8" response. |
static HttpResponseImpl |
HttpResponse.internalError(Throwable error)
Create an internal error response.
|
static HttpResponseImpl |
HttpResponse.redirect(HttpStatus status,
String uri)
Create a "redirect" response.
|
static HttpResponseImpl |
HttpResponse.redirect(String uri)
Create a "redirect" response.
|
HttpResponseImpl |
HttpResponseImpl.status(HttpStatus status)
Set the status.
|
static HttpResponseImpl |
HttpResponse.text(int statusCode,
CharSequence... texts)
Create a
"text/plain;charset=UTF-8" response. |
static HttpResponseImpl |
HttpResponse.throttle(long bytesPerSecond,
HttpResponse response)
Throttle the response.
|