package devkit

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Devkit_core.WebSource

web utilities

Sourceval rawurlencode : string -> string

percent-encode (convert space into %20)

Sourceval urlencode : string -> string

percent-encode, but convert space into plus, not %20

Sourceval rawurldecode : string -> string

percent-decode (leave plus as is)

Sourceval urldecode : string -> string

percent-decode and convert plus into space

Sourceval htmlencode : string -> string
Sourceval htmldecode_exn : string -> string
Sourceval htmldecode : string -> string
Sourceval htmldecode_relaxed : string -> string
Sourceval make_url_args : (string * string) list -> string
Sourceval parse_url_args : string -> (string * string) list

Minimum strictness, Neturl will fail on malformed parameters in url

Sourceval url_get_args : string -> (string * string) list
Sourceval curl_times : Curl.t -> (string * float) list
Sourcemodule CurlCache : sig ... end
Sourceval curl_default_setup : Curl.t -> unit
Sourcetype http_action_old = [
  1. | `GET
  2. | `POST_FORM of (string * string) list
  3. | `POST of string * string
  4. | `PUT of string * string
  5. | `DELETE
  6. | `CUSTOM of string * string * string
]
Sourcetype http_body = [
  1. | `Raw of string * string
  2. | `Form of (string * string) list
  3. | `Chunked of string * (unit -> string)
]
Sourcetype http_action = [
  1. | `GET
  2. | `POST
  3. | `PUT
  4. | `PATCH
  5. | `DELETE
  6. | `CUSTOM of string
]
Sourceval string_of_http_action : http_action -> string
Sourceval http_action_of_string : string -> http_action
Sourcemodule type IO_TYPE = sig ... end
Sourcemodule type CURL = sig ... end
Sourcetype ('body, 'ret) http_request_ = ?ua:string -> ?timeout:int -> ?verbose:bool -> ?setup:(Curl.t -> unit) -> ?timer:Action.timer -> ?max_size:int -> ?http_1_0:bool -> ?headers:string list -> ?body:'body -> http_action -> string -> 'ret
Sourcetype 'ret http_request = ([ `Form of (string * string) list | `Raw of string * string ], 'ret) http_request_
Sourcemodule type HTTP = sig ... end
Sourceval show_result : ?verbose:bool -> [< `Error of Curl.curlCode | `Ok of int * string ] -> string
Sourceval simple_result : ?is_ok:(int -> bool) -> ?verbose:bool -> [< `Error of Curl.curlCode | `Ok of int * string Ok ] -> [> `Error of string | `Ok of string ]
Sourceval nr_http : int ref
Sourcemodule Http (IO : IO_TYPE) (Curl_IO : CURL with type 'a t = 'a IO.t) : HTTP with type 'a IO.t = 'a IO.t
Sourcemodule IO_blocking : sig ... end
Sourcemodule IO_lwt : sig ... end
Sourcemodule Curl_blocking : sig ... end
Sourcemodule Curl_lwt_for_http : sig ... end
Sourcemodule Http_blocking : sig ... end
Sourcemodule Http_lwt : sig ... end
Sourceval with_curl : (Curl.t -> 'a Http_blocking.IO.t) -> 'a Http_blocking.IO.t
Sourceval with_curl_cache : (Curl.t -> 'a Http_blocking.IO.t) -> 'a Http_blocking.IO.t
Sourceval http_request' : [> `Error of Curl.curlCode | `Ok of int * string ] Http_blocking.request
Sourceval http_request : [> `Error of string | `Ok of string ] Http_blocking.request
Sourceval http_request_exn : string Http_blocking.request
Sourceval http_query : (string * string, [> `Error of string | `Ok of string ]) Http_blocking.request_
Sourceval http_submit : ?ua:string -> ?timeout:int -> ?verbose:bool -> ?setup:(Curl.t -> unit) -> ?timer:Action.timer -> ?http_1_0:bool -> ?headers:string list -> ?action:http_action -> string -> (string * string) list -> [> `Error of string | `Ok of string ] Http_blocking.IO.t
Sourceval http_request_lwt' : [> `Error of Curl.curlCode | `Ok of int * string ] Http_lwt.request
Sourceval http_request_lwt : [> `Error of string | `Ok of string ] Http_lwt.request
Sourceval http_request_lwt_exn : string Http_lwt.request
Sourceval http_query_lwt : (string * string, [> `Error of string | `Ok of string ]) Http_lwt.request_
Sourceval http_submit_lwt : ?ua:string -> ?timeout:int -> ?verbose:bool -> ?setup:(Curl.t -> unit) -> ?timer:Action.timer -> ?http_1_0:bool -> ?headers:string list -> ?action:http_action -> string -> (string * string) list -> [> `Error of string | `Ok of string ] Http_lwt.IO.t
Sourceval string_of_http_code : int -> string
Sourceval class_of_http_code : int -> string
OCaml

Innovation. Community. Security.