devkit

Development kit - general purpose library
IN THIS PACKAGE
type encoding =
| Gzip
| Identity
type meth = [
| `GET
| `POST
| `PUT
| `PATCH
| `DELETE
| `HEAD
| `OPTIONS
]
type request = {
addr : Unix.sockaddr;
url : string;
path : string;
args : (string * string) list;
conn : Time.t;
recv : Time.t;
meth : meth;
headers : (string * string) list;
body : string;
version : int * int;
id : int;
socket : Unix.file_descr;
line : string;(*

request line

*)
mutable blocking : unit IO.output option;
encoding : encoding;
}
type reply_status = [
| `Ok
| `Created
| `No_content
| `Found
| `Moved
| `Bad_request
| `Unauthorized
| `Payment_required
| `Forbidden
| `Not_found
| `Method_not_allowed
| `Not_acceptable
| `Conflict
| `Length_required
| `Request_too_large
| `I'm_a_teapot
| `Internal_server_error
| `Not_implemented
| `Service_unavailable
| `Version_not_supported
| `Custom of string
]
type extended_reply_status = [
| reply_status
| `No_reply
]
type 'status reply' = 'status * (string * string) list * string
val show_method : [< `DELETE | `GET | `HEAD | `OPTIONS | `PATCH | `POST | `PUT ] -> string
val method_of_string : string -> [> `DELETE | `GET | `HEAD | `OPTIONS | `PATCH | `POST | `PUT ]
val show_client_addr : request -> string
val client_addr : request -> Unix.inet_addr * int
val client_ip : request -> Unix.inet_addr
val find_header : request -> string -> string
val header_exn : request -> string -> string
val header_safe : request -> string -> string
val header_referer : request -> string
val show_request : request -> string
val status_code : reply_status -> int
val show_http_reply : reply_status -> string
val cors_preflight_allow_all : [> `No_content ] * (string * string) list * string