blob: ecd73499d42375861ec61e1a18c26c335bd2fb4b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
module type GEMINI_TRANSACTION =
sig
type request
module T : TlsUtils.TLS_UTILS
module M : MimeType.MIME_TYPE
type mime_type = M.t
type status =
| INPUT
| SUCCESS of mime_type
| SUCCESS_EOCSS
| REDIR_TEMP of string
| REDIR_PERM of string
| TEMP_FAIL
| SERVER_UNAVAILABLE
| CGI_ERROR
| PROXY_ERROR
| SLOW_DOWN of int
| PERM_FAIL
| NOT_FOUND
| GONE
| PROXY_REQ_REFUSED
| BAD_REQ
| CLIENT_CERT_REQUIRED
| TRANSIENT_CERT_REQUESTED
| AUTHORISED_CERT_REQUIRED
| CERT_NOT_ACCEPTED
| FUTURE_CERT_REJECTED
| EXPIRED_CERT_REJECTED
type response = status * string
val make_request : ?authenticator:T.authenticator
-> ?max_redirects:int -> string -> (request, string) Base.Result.t
val update_request : ?authenticator:T.authenticator
-> ?max_redirects:int -> ?url:string
-> request -> (request, string) Base.Result.t
val status_of_string : string -> (status, string) Base.Result.t
val int_of_status : status -> int
val name_of_status : status -> string
val string_of_status : status -> string
val transaction : request -> (response, string) Base.Result.t Lwt.t
val session : request -> (response, string) Base.Result.t Lwt.t
end
module GeminiTransaction (M : MimeType.MIME_TYPE) (T : TlsUtils.TLS_UTILS)
: GEMINI_TRANSACTION with module M = M and module T = T
|