package sihl

  1. Overview
  2. Docs
The modular functional web framework

Install

Dune Dependency

Authors

Maintainers

Sources

sihl-0.1.4.tbz
sha256=49fe887d05083b37523cd6e7ca35239822c561fe7109dd383c30aeb4259a7b98
sha512=4135ad42a75fb9adc3e853a466b696d9ee6d7a9d8acf0cee9fd5f5485679a517f524ce704e2d153df4a7c4f1d14df9f94ab2a8fbe5b36e744b505daab1d40f3d

doc/sihl.http/Http/Res/index.html

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.