package aws

  1. Overview
  2. Docs

This module is used to produce the nested url query structure used in AWS api requests.

type t =
  1. | List of t list
  2. | Pair of string * t
  3. | Value of string option

The query type. In the following examples, constructors are ellided for brevity.

Structs are encoded as (name1, val); (name2, val)....

Lists are encoded as (0, val); (1, val)....

val render : t -> string

This is how to turn a Query.t into a string suitable for including in a url. It is a query string, ie field=val&field=val...

val to_query_list : ('a -> t) -> 'a list -> t

This is a helper to convert a list into a Query.t. It encodes it as (0, val); (1, val)....

OCaml

Innovation. Community. Security.