package gapi-ocaml

  1. Overview
  2. Docs
A simple OCaml client for Google Services

Install

Dune Dependency

Authors

Maintainers

Sources

v0.4.6.tar.gz
sha256=b84b680528a5e050014103a8e7a60a5d43efd5fefc3f838310bd46769775ab48
md5=8ee26acf1f6c6f5e24c7b57fa070a0a2

doc/gapi-ocaml.netstring-local/Netencoding/Url/index.html

Module Netencoding.UrlSource

Encoding/Decoding within URLs: * * The following two functions perform the '%'-substitution for * characters that may otherwise be interpreted as metacharacters. * * According to: RFC 1738, RFC 1630 * * Option plus: This option has been added because there are some * implementations that do not map ' ' to '+', for example Javascript's * escape function. The default is true because this is the RFC- * compliant definition.

There are no tstring and polymorphic versions of the encode and decode functions, as URLs are comparatively short, and it is considered as acceptable for the user to convert types as needed, even if strings need to be copied for that.

Sourceval decode : ?plus:bool -> ?pos:int -> ?len:int -> string -> string

Option plus: Whether '+' is converted to space. The default * is true. If false, '+' is returned as it is. * * The optional arguments pos and len may restrict the string * to process to this substring.

Sourceval encode : ?plus:bool -> string -> string

Option plus: Whether '+' is converted to space. The default * is true. If false, '+' is returned as it is. * * The optional arguments pos and len may restrict the string * to process to this substring.

Option plus: Whether spaces are converted to '+'. The default * is true. If false, spaces are converted to "%20", and * only %xx sequences are produced.

URL-encoded parameters: * * The following two functions create and analyze URL-encoded parameters. * Format: name1=val1&name2=val2&...

Sourceval mk_url_encoded_parameters : (string * string) list -> string

The argument is a list of (name,value) pairs. The result is the * single URL-encoded parameter string.

Sourceval dest_url_encoded_parameters : string -> (string * string) list

The argument is the URL-encoded parameter string. The result is * the corresponding list of (name,value) pairs. * Note: Whitespace within the parameter string is ignored. * If there is a format error, the function fails.

OCaml

Innovation. Community. Security.