bungibindies/bun/http/serve/response

Types

The response to a request

pub type Response

Functions

pub fn clone(res: Response) -> Response
pub fn headers(res: Response) -> Array(#(String, String))
pub fn new() -> Response
pub fn ok(res: Response) -> Bool
pub fn redirected(res: Response) -> Bool
pub fn set_body(res: Response, body: a) -> Response
pub fn set_headers(
  res: Response,
  headers: Array(#(String, String)),
) -> Response
pub fn set_status(res: Response, status: Int) -> Response
pub fn set_status_text(
  res: Response,
  status_text: String,
) -> Response
pub fn status(res: Response) -> Int
pub fn status_text(res: Response) -> String
pub fn type_(res: Response) -> String

“basic” | “cors” | “default” | “error” | “opaque” | “opaqueredirect”

pub fn url(res: Response) -> String
Search Document