package sihl

  1. Overview
  2. Docs
The modular functional web framework

Install

Dune Dependency

Authors

Maintainers

Sources

sihl-0.1.1.tbz
sha256=eac58e5ee9c869aa3b0f0bcee936b01c53bf7fe1febb42edd607268dfb11f4e9
sha512=012b6cf1cf6af0966059761b4916ea8aa590aa8d5809a6f480cb17e23ee10c3b9245062c4f0cf9ad98ab950391c0827c9780999d39fa16a93f7aab4b12f9ab8c

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.