package devkit

  1. Overview
  2. Docs

Parameters

module T : sig ... end

Signature

exception Bad of string
val req : request
val get : string -> string option

Get optional parameter.

  • returns

    None if parameter is missing

val str : ?default:string -> string -> string

Get required parameter.

  • raises Bad

    if parameter is missing and no default provided

val get_int : string -> int option

Get optional integer parameter

val int : ?default:int -> string -> int

Get integer parameter.

  • raises Bad

    if parameter is missing and no default provided

val bool : ?default:bool -> string -> bool

Get boolean parameter.

  • returns

    true when parameter value is "true", false otherwise.

    @raise Bad

    if missing and no default provided.

val float : ?default:float -> string -> float
val int64 : ?default:int64 -> string -> int64
val array : string -> string list
  • parameter name

    array name without brackets e.g. array "x" to extract x from /request?x=1&x=2