Index of values

A
add [Restful.Url.Q]

add name value url: add a new parameter named name with value value to the QUERY_STRING.

all [Restful.Robots]

all main: convert main into a function that also answers /robots.txt requests with a response that allows all robots to access all URI's.

array [Restful.Json]

(array f xs) is (Array (map f xs)).

at_least_one [Restful.Param]

at_least_one names vp: insist that at least one of the parameters in names is given.

atleast [Restful.Valid]

atleast n str: is the number represented by the string >= n?

atmost [Restful.Valid]

atmost n str: is the number represented by the string <= n?

B
basic [Restful.Auth.Cred]
basic [Restful.Auth]
bool [Restful.Json]

(bool b) is (Bool b).

boolean [Restful.Valid]

Is the string either "true" or "false"?

boolean [Restful.Convert]

Convert to a native bool.

C
callback [Restful.Json]

(callback ?minify cb json): convert a json data structure to a string in "Json callback" representation.

clf_format [Restful.Log]

clf_format ?ident ?authuser ?time ?bytes ?host ?request status cgi formats a line in Common Log Format from the status and the CGI activation.

conjunction [Restful.Valid]

conjunction list: return a predicate which is the conjunction of the validators in a list

content_type [Restful.Favicon]

The MIME content-type for Restful.Favicon.ico, i.e.

content_type [Restful.Json]

The correct content-type for Json data.

D
delete [Restful.Url.Q]

delete name url: delete the parameter named name from the QUERY_STRING.

digest [Restful.Auth.Cred]
disjunction [Restful.Valid]

disjunction list: return a predicate which is the disjunction of the validators in a list

dispatch [Restful.Pathinfo]

dispatch ?def service map cgi: dispatcher for services that implement sub-services based on PATH_INFO.

dump [Restful.Config]

dump: I'm sure this dumps something!

E
error [Restful.LOG]

Type of function that generates error messages; these messages are analogous to those in Apache's error_log file.

error [Restful]

error fmt ...: raise a User_exn with an error message formatted as per Printf.

even [Restful.Valid]

Is the number represented by the string an even integer?

F
favicon [Restful.Favicon]

favicon ?file ?data main: convert main into a function that also answers /favicon.ico requests.

float [Restful.Json]

(float f) is (Float f).

float [Restful.Convert]

Convert to a float.

G
get [Restful.Param]

get cgi mandopt validator name: get one QUERY_STRING parameter name, validating it with validator.

given [Restful.Auth.Valid]
H
handler [Restful.ERROR]

Type of function that handles errors.

handler [Restful.LOG]

Type of function which handles logging.

html [Restful.Encode]

htmlencode ?in_enc ?out_enc str: encode str for HTML (or XML)

I
ico [Restful.Favicon]

The default Restful favicon, a base64-encoded image/vnd.microsoft.icon.

in_map [Restful.Valid]

in_map map v: valid if parameter value v is a key in the parsed refer Restful.Config file map.

init [Restful.LOG]
init [Restful.SERVICE]

Type of service initialization function.

int [Restful.Convert]

Convert to a native int.

int64 [Restful.Convert]

Convert to an Int64.t.

J
javascript_identifier [Restful.Valid]

javascript_identifier v: valid if parameter value v is a syntactically correct Javascript identifier (see the standard).

json_of_jsonm [Restful.Json]

json_of_jsonm is effectively of type Jsonm.json -> json i.e.

L
list_member [Restful.Valid]

list_member list string: is the string a member of the set represented by list?

load [Restful.Config]

load ?validate key filename: load the config file in the given filename.

loadenv [Restful.Config]

loadenv ?validate key var: load the config file named in an environment variable.

loginit [Restful.ERROR]
M
main [Restful.Make]

main ?argv (): run the service function Service.main.

main [Restful.SERVICE]

Type of function that implements a service.

me [Restful.Url]

me ?pi ?qs cgi: return the service's own URL, optionally replacing the QUERY_STRING (qs) or PATH_INFO (pi).

mutex [Restful.Param]

mutex ?atleast x y vp: reject mutually exclusive parameters.

N
no_dot_dot [Restful.Valid]

no_dot_dot param: valid if param does not contain any ".." components.

noblanks [Restful.Valid]

Is the string completely free of blanks? (A single blank invalidates the string.)

none [Restful.Robots]

none main: convert main into a function that also answers /robots.txt requests with a response that refuses all robots access to any URI's.

nonzero [Restful.Valid]

Is the number represented by the string non-zero?

notblank [Restful.Valid]

Is the string not completely blank (i.e.

notnull [Restful.Valid]

Is the string not null (i.e.

null [Restful.Json]

(null x) is Null.

num [Restful.Json]

(num n) is (Num n).

numeric [Restful.Valid]

Is the string numeric (i.e.

O
obj [Restful.Json]

(obj f alist) is (Object (map (fun (s,x) -> s, f x) alist)).

odd [Restful.Valid]

Is the number represented by the string an odd integer?

of_option [Restful.Json]

(of_option f (Some x)) is (f x) and (of_option f None) is Null.

optvalue [Restful.Param]

optvalue params name: given a validated parameter list params, as returned by process, and a parameter name, return the value of the parameter as a string option.

P
positive [Restful.Valid]

Is the number represented by the string a positive integer?

process [Restful.Param]

process ?strict cgi spec: process QUERY_STRING parameters according to spec, returning validated parameter list.

R
redirect [Restful.Content]

redirect ?msg ?status cgi location: generate a redirect to location.

relative [Restful.Valid]

relative param: valid if parameter is in the form of a relative filename, i.e.

replace [Restful.Url.Q]

replace name value url: replace the QUERY_STRING parameter named name with value.

replace [Restful.Url.P]

replace pi url: replace the entire PATH_INFO with pi.

S
some [Restful.Robots]

some ?text ?file ?robots main: convert main into a function that also answers /robots.txt requests with a customized response.

string [Restful.Json]

(string s) is (String s).

subdir_of [Restful.Valid]

subdir_of ?dotok dir param: valid if parameter param is a (direct) subdirectory of dir i.e., is a child.

subtree_of [Restful.Valid]

subtree_of dir param: valid if parameter param is a subtree of dir, i.e.

T
to_string [Restful.Json]

(to_string ?minify json): convert a json data structure to a string in Json representation.

to_string [Restful.Url]

to_string url: convert the URL to a properly encoded string.

U
url [Restful.Valid]

Is the parameter a syntactically valid URL?

V
valid_id [Restful.Json]
value [Restful.Param]

value ?default params name: given a validated parameter list params, as returned by process, and a parameter name, return the value of the parameter.

version [Restful.SERVICE]

Type of version information, displayed by the version subcommand.

W
write [Restful.Content]

write ?content_type cgi str: write out content as the total value of the service call.

Z
zap [Restful.Url.Q]

zap url: remove the entire QUERY_STRING from the url.

zap [Restful.Url.P]

zap url: remove the entire PATH_INFO string from the URL.