Plasma GitLab Archive
Projects Blog Knowledge

Class type Nethttp_client.key

class type key = object .. end

A key is a user/password combination for a certain realm

method user : string

The user name (UTF-8)

method password : string

The password in cleartext (UTF-8)

method realm : string

The realm

method domain : Neturl.url list

The domain URIs defining the protection space. The domain URIs are absolute URIs. For proxy access the list must be empty.

Normally, this is just a list with one element. The URI must include the protocol scheme, the host name, the port, and a path (at minimum "/"). The key is valid for all request URIs for which this domain string is a prefix of the request URI. Examples: "http://localhost:80/" would cover all of "localhost". "http://localhost:80/space/" would cover all URIs at this or below this URI. "https://localhost:443/" would cover all of "localhost" when accessed via TLS.

If the key is applicable to all domains, set this to [].

method credentials : (string * string * (string * string) list) list

The key in the common "credentials" format that is used by generic mechanisms. See Nethttp.HTTP_CLIENT_MECHANISM.init_credentials for details.

Note that since Ocamlnet-4.1 we explicitly specify that cleartext passwords are encoded in UTF-8 - independently of what the protocol assumes.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml