package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

Dune Dependency

Authors

Maintainers

Sources

bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303

doc/bonsai.uri_parsing/Uri_parsing/Components/index.html

Module Uri_parsing.ComponentsSource

Represents parts of a URL.

Each kind of parser consumes from this "pool" of parts of a url.

Parsers that consume from the query will lookup the query map, parse, and consume the element from the query.

Parsers that consume from the path will read the path in sequential order, from the beginning of the path to the end of the path. Once a path parser, is done parsing, it will remove its consumed elements from the path, and the next path parser will continue where it left off.

Sourcetype t = {
  1. path : string list;
    (*

    "foo/bar" -> "foo"; "bar"

    *)
  2. query : string list Core.String.Map.t;
    (*

    "?foo=1&bar=2" -> String.Map.of_alist_exn "foo", ["1"]; "bar", ["2"]

    *)
}
include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval empty : t
OCaml

Innovation. Community. Security.