package sihl

  1. Overview
  2. Docs
The modular functional web framework

Install

Dune Dependency

Authors

Maintainers

Sources

sihl-0.1.3.tbz
sha256=3d1acdd1eae24a7131033656f90b5d20c1621e6ef92957edf88a09b8b5f2d9e9
sha512=d224f54e20a9465c7a03d534dadcb2b9a181ae87c13731840db945aab37534f6f3982c5cb25a197e90c17d8772da062b19fa92bb93ed53a8b736c3776a7776db

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.