package http-cookie
HTTP cookie library for OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
http-cookie-v3.1.0.tbz
sha256=bd3fe88bf73482c9f0c4be2a69977675d615cda856f2dc5498cd94ce27277aa5
sha512=2f16c29ed6d870114a54f3ad2f4d470a593dfd645f8d89a0db93ed524a2fe341025065ff00217afb3e5035f6d79a2c35bf9c5618d2404f1dcd0aaffcc718164a
Description
OCaml library to manipulate HTTP cookie. Adheres to RFC 6265.
Published: 11 Aug 2021
README
Cookies
A comprehensive and standards compliant HTTP cookies library for ocaml.
HTTP cookies are serialized as follows:
In a
Cookie
header in a HTTP requestIn a
Set-Cookie
header in a HTTP response.
The library supports consuming and creating HTTP cookies in both requests and responses.
The standard implemented by the library is RFC 6265.
Installation
$ opam install http-cookie
Usage
Create a cookie,
Http_cookie.create "SID" "23432324"
Serialize cookie to a HTTP Set-Cookie
header value,
let s = Http_cookie.to_set_cookie_header_value c in
s = "SID=31d4d96e407aad42; Path=/; Secure; HttpOnly; Expires=Sun, 06 Nov 1994 08:49:37 GMT"
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page