package sihl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type body =
  1. | String of string
  2. | File_path of string
type t
val pp : Stdlib.Format.formatter -> t -> unit
val equal : t -> t -> bool
val file : string -> Sihl__.Web_core.content_type -> t

file file_path content_type streams a file at file_path as HTTP response with the Content-Type header set to content_type.

val html : t
val json : t
val redirect : string -> t
val redirect_path : t -> string option
val body : t -> body option
val set_body : string -> t -> t
val headers : t -> (string * string) list
val set_headers : (string * string) list -> t -> t
val content_type : t -> Sihl__.Web_core.content_type
val set_content_type : Sihl__.Web_core.content_type -> t -> t
val opium_res : t -> Opium_kernel.Response.t option
val set_opium_res : Opium_kernel.Response.t -> t -> t
val cookies : t -> (string * string) list
val status : t -> int
val set_status : int -> t -> t
OCaml

Innovation. Community. Security.