package sihl

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Http.ResSource

Sourcetype body =
  1. | String of string
  2. | File_path of string
Sourcetype t
Sourceval pp : Format.formatter -> t -> unit
Sourceval equal : t -> t -> bool
Sourceval file : string -> Http__.Http_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.

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

Innovation. Community. Security.