package sihl

  1. Overview
  2. Docs
The modular functional web framework

Install

Dune Dependency

Authors

Maintainers

Sources

sihl-queue-0.1.5.tbz
sha256=bfa7bde9af02bb83d5ca39d54797b05b43317f033d93d24ca86ca42ff8ef83a1
sha512=6bb8727f65116e8042aa1fb77b3c14851ce5238f7b412adadf0f8e5b52d5310e8f06056c96bf76a82ffd7096753f49b2b0482f41e18ee1ca94310b874fe81bf9

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.