A batteries included HTTP/1.1 client in OCaml

metadata

+350 -23
+19 -1
.gitignore
··· 1 - _build 2 conpool 3 cookeio
··· 1 + # OCaml build artifacts 2 + _build/ 3 + *.install 4 + *.merlin 5 + 6 + # Third-party sources (fetch locally with opam source) 7 + third_party/ 8 + 9 + # Editor and OS files 10 + .DS_Store 11 + *.swp 12 + *~ 13 + .vscode/ 14 + .idea/ 15 + 16 + # Opam local switch 17 + _opam/ 18 + 19 + # Symlinks to local dependencies (development only) 20 conpool 21 cookeio
+1
.ocamlformat
···
··· 1 + version=0.28.1
+53
.tangled/workflows/build.yml
···
··· 1 + when: 2 + - event: ["push", "pull_request"] 3 + branch: ["main"] 4 + 5 + engine: nixery 6 + 7 + dependencies: 8 + nixpkgs: 9 + - shell 10 + - stdenv 11 + - findutils 12 + - binutils 13 + - libunwind 14 + - ncurses 15 + - opam 16 + - git 17 + - gawk 18 + - gnupatch 19 + - gnum4 20 + - gnumake 21 + - gnutar 22 + - gnused 23 + - gnugrep 24 + - diffutils 25 + - gzip 26 + - bzip2 27 + - gcc 28 + - ocaml 29 + - pkg-config 30 + 31 + steps: 32 + - name: opam 33 + command: | 34 + opam init --disable-sandboxing -a -y 35 + - name: repo 36 + command: | 37 + opam repo add aoah https://tangled.org/anil.recoil.org/aoah-opam-repo.git 38 + - name: switch 39 + command: | 40 + opam install . --confirm-level=unsafe-yes --deps-only 41 + - name: build 42 + command: | 43 + opam exec -- dune build 44 + - name: switch-test 45 + command: | 46 + opam install . --confirm-level=unsafe-yes --deps-only --with-test 47 + - name: test 48 + command: | 49 + opam exec -- dune runtest --verbose 50 + - name: doc 51 + command: | 52 + opam install -y odoc 53 + opam exec -- dune build @doc
+15
LICENSE.md
···
··· 1 + ISC License 2 + 3 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org> 4 + 5 + Permission to use, copy, modify, and distribute this software for any 6 + purpose with or without fee is hereby granted, provided that the above 7 + copyright notice and this permission notice appear in all copies. 8 + 9 + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+70
README.md
···
··· 1 + # requests - HTTP Client Library for OCaml 2 + 3 + A modern HTTP(S) client library for OCaml with Eio support, providing a clean API for making web requests with automatic TLS/CA certificate handling. Inspired by Python's requests library. 4 + 5 + ## Key Features 6 + 7 + - **Clean Eio-style API**: Async I/O using OCaml 5's Eio library 8 + - **Automatic TLS**: Built-in TLS support with automatic CA certificate handling 9 + - **Simple Interface**: Intuitive API similar to Python's requests library 10 + - **Type-safe**: Leverages OCaml's type system for safer HTTP operations 11 + - **Comprehensive**: Support for common HTTP methods, headers, authentication, retries, and timeouts 12 + 13 + ## Usage 14 + 15 + Basic GET request: 16 + 17 + ```ocaml 18 + let () = 19 + Eio_main.run @@ fun env -> 20 + let response = Requests.get ~env (Uri.of_string "https://example.com") in 21 + print_endline (Requests.Response.body_string response) 22 + ``` 23 + 24 + POST request with JSON body: 25 + 26 + ```ocaml 27 + let () = 28 + Eio_main.run @@ fun env -> 29 + let uri = Uri.of_string "https://api.example.com/data" in 30 + let body = {|{"key": "value"}|} in 31 + let headers = Requests.Headers.of_list [ 32 + ("content-type", "application/json") 33 + ] in 34 + let response = Requests.post ~env ~headers ~body uri in 35 + Printf.printf "Status: %d\n" (Requests.Response.status_code response) 36 + ``` 37 + 38 + Using authentication and custom headers: 39 + 40 + ```ocaml 41 + let () = 42 + Eio_main.run @@ fun env -> 43 + let auth = Requests.Auth.basic ~username:"user" ~password:"pass" in 44 + let headers = Requests.Headers.add 45 + (Requests.Headers.init ()) 46 + "user-agent" "my-app/1.0" in 47 + let response = Requests.get ~env ~auth ~headers 48 + (Uri.of_string "https://api.example.com") in 49 + (* Process response *) 50 + () 51 + ``` 52 + 53 + ## Installation 54 + 55 + ``` 56 + opam install requests 57 + ``` 58 + 59 + ## Documentation 60 + 61 + API documentation is available at https://tangled.org/@anil.recoil.org/ocaml-requests or via: 62 + 63 + ``` 64 + opam install requests 65 + odig doc requests 66 + ``` 67 + 68 + ## License 69 + 70 + ISC
+5
bin/ocurl.ml
··· 1 open Eio 2 open Cmdliner 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 open Eio 7 open Cmdliner 8
+4
dune
···
··· 1 + ; Root dune file 2 + 3 + ; Ignore third_party directory (for fetched dependency sources) 4 + (data_only_dirs third_party)
+21 -12
dune-project
··· 1 - (lang dune 3.0) 2 (name requests) 3 4 (generate_opam_files true) 5 6 - (source 7 - (github username/requests)) 8 - 9 - (authors "Your Name") 10 11 - (maintainers "Your Name") 12 - 13 - (license MIT) 14 15 (package 16 (name requests) 17 (synopsis "Clean Eio-style HTTPS client library for OCaml") 18 - (description "A modern HTTP(S) client library for OCaml with Eio support, providing a clean API for making web requests with automatic TLS/CA certificate handling") 19 (depends 20 - ocaml 21 - (dune (>= 3.0)) 22 eio 23 cohttp-eio 24 tls-eio ··· 27 uri 28 digestif 29 base64 30 - logs))
··· 1 + (lang dune 3.20) 2 + 3 (name requests) 4 5 (generate_opam_files true) 6 7 + (license ISC) 8 + (authors "Anil Madhavapeddy") 9 + (homepage "https://tangled.org/@anil.recoil.org/ocaml-requests") 10 + (maintainers "Anil Madhavapeddy <anil@recoil.org>") 11 + (bug_reports "https://tangled.org/@anil.recoil.org/ocaml-requests/issues") 12 + (maintenance_intent "(latest)") 13 14 + ; NOTE: Do NOT add a (source ...) field for Tangled projects 15 + ; Tangled uses the homepage/bug_reports URLs to determine the source repository 16 17 (package 18 (name requests) 19 (synopsis "Clean Eio-style HTTPS client library for OCaml") 20 + (description 21 + "A modern HTTP(S) client library for OCaml with Eio support, providing \ 22 + a clean API for making web requests with automatic TLS/CA certificate handling. \ 23 + Inspired by Python's requests library, this provides a simple, intuitive \ 24 + interface for HTTP operations.") 25 (depends 26 + (ocaml (>= 5.1.0)) 27 + (dune (>= 3.20)) 28 eio 29 cohttp-eio 30 tls-eio ··· 33 uri 34 digestif 35 base64 36 + logs 37 + (odoc :with-doc) 38 + (alcotest (and :with-test (>= 1.7.0))) 39 + (eio_main :with-test)))
+5
examples/session_example.ml
··· 1 open Eio 2 3 let () =
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 open Eio 7 8 let () =
+5
lib/auth.ml
··· 1 let src = Logs.Src.create "requests.auth" ~doc:"HTTP Authentication" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.auth" ~doc:"HTTP Authentication" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/auth.mli
··· 1 (** Authentication mechanisms *) 2 3 (** Log source for authentication operations *)
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** Authentication mechanisms *) 7 8 (** Log source for authentication operations *)
+6 -1
lib/body.ml
··· 1 let src = Logs.Src.create "requests.body" ~doc:"HTTP Request/Response Body" 2 module Log = (val Logs.src_log src : Logs.LOG) 3 ··· 63 (* JSON streaming using jsont - we encode the value to string and stream it *) 64 module Json_stream_source = struct 65 type t = { 66 - mutable content : string; 67 mutable offset : int; 68 } 69
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.body" ~doc:"HTTP Request/Response Body" 7 module Log = (val Logs.src_log src : Logs.LOG) 8 ··· 68 (* JSON streaming using jsont - we encode the value to string and stream it *) 69 module Json_stream_source = struct 70 type t = { 71 + content : string; 72 mutable offset : int; 73 } 74
+5
lib/body.mli
··· 1 (** HTTP request body construction 2 3 This module provides various ways to construct HTTP request bodies,
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** HTTP request body construction 7 8 This module provides various ways to construct HTTP request bodies,
+5
lib/error.ml
··· 1 (** Centralized error handling for the Requests library *) 2 3 let src = Logs.Src.create "requests.error" ~doc:"HTTP Request Errors"
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** Centralized error handling for the Requests library *) 7 8 let src = Logs.Src.create "requests.error" ~doc:"HTTP Request Errors"
+5
lib/error.mli
··· 1 (** Centralized error handling for the Requests library *) 2 3 (** Log source for error reporting *)
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** Centralized error handling for the Requests library *) 7 8 (** Log source for error reporting *)
+5
lib/headers.ml
··· 1 let src = Logs.Src.create "requests.headers" ~doc:"HTTP Headers" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.headers" ~doc:"HTTP Headers" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/headers.mli
··· 1 (** HTTP headers management with case-insensitive keys 2 3 This module provides an efficient implementation of HTTP headers with
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** HTTP headers management with case-insensitive keys 7 8 This module provides an efficient implementation of HTTP headers with
+5
lib/http_client.ml
··· 1 (** Low-level HTTP/1.1 client over raw TCP connections for connection pooling *) 2 3 let src = Logs.Src.create "requests.http_client" ~doc:"Low-level HTTP client"
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** Low-level HTTP/1.1 client over raw TCP connections for connection pooling *) 7 8 let src = Logs.Src.create "requests.http_client" ~doc:"Low-level HTTP client"
+5
lib/method.ml
··· 1 let src = Logs.Src.create "requests.method" ~doc:"HTTP Methods" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.method" ~doc:"HTTP Methods" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/method.mli
··· 1 (** HTTP methods following RFC 7231 *) 2 3 (** Log source for method operations *)
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** HTTP methods following RFC 7231 *) 7 8 (** Log source for method operations *)
+5
lib/mime.ml
··· 1 let src = Logs.Src.create "requests.mime" ~doc:"MIME Type Handling" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.mime" ~doc:"MIME Type Handling" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/mime.mli
··· 1 (** MIME type handling *) 2 3 (** Log source for MIME type operations *)
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** MIME type handling *) 7 8 (** Log source for MIME type operations *)
+5
lib/one.ml
··· 1 let src = Logs.Src.create "requests.one" ~doc:"One-shot HTTP Requests" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.one" ~doc:"One-shot HTTP Requests" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/one.mli
··· 1 (** One-shot HTTP client for stateless requests 2 3 The One module provides a stateless HTTP client for single requests without
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** One-shot HTTP client for stateless requests 7 8 The One module provides a stateless HTTP client for single requests without
+5
lib/requests.ml
··· 1 (** OCaml HTTP client library with streaming support *) 2 3 let src = Logs.Src.create "requests" ~doc:"HTTP Client Library"
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** OCaml HTTP client library with streaming support *) 7 8 let src = Logs.Src.create "requests" ~doc:"HTTP Client Library"
+5
lib/requests.mli
··· 1 (** Requests - A modern HTTP client library for OCaml 2 3 Requests is an HTTP client library for OCaml inspired by Python's requests
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** Requests - A modern HTTP client library for OCaml 7 8 Requests is an HTTP client library for OCaml inspired by Python's requests
+5
lib/response.ml
··· 1 let src = Logs.Src.create "requests.response" ~doc:"HTTP Response" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.response" ~doc:"HTTP Response" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/response.mli
··· 1 (** HTTP response handling 2 3 This module represents HTTP responses and provides functions to access
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** HTTP response handling 7 8 This module represents HTTP responses and provides functions to access
+5
lib/retry.ml
··· 1 let src = Logs.Src.create "requests.retry" ~doc:"HTTP Request Retry Logic" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.retry" ~doc:"HTTP Request Retry Logic" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/retry.mli
··· 1 (** HTTP request retry logic with exponential backoff *) 2 3 open Eio
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** HTTP request retry logic with exponential backoff *) 7 8 open Eio
+5
lib/status.ml
··· 1 (** HTTP status codes following RFC 7231 and extensions *) 2 3 let src = Logs.Src.create "requests.status" ~doc:"HTTP Status Codes"
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** HTTP status codes following RFC 7231 and extensions *) 7 8 let src = Logs.Src.create "requests.status" ~doc:"HTTP Status Codes"
+5
lib/status.mli
··· 1 (** HTTP status codes following RFC 7231 and extensions *) 2 3 (** Log source for status code operations *)
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** HTTP status codes following RFC 7231 and extensions *) 7 8 (** Log source for status code operations *)
+5
lib/timeout.ml
··· 1 let src = Logs.Src.create "requests.timeout" ~doc:"HTTP Request Timeouts" 2 module Log = (val Logs.src_log src : Logs.LOG) 3
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 let src = Logs.Src.create "requests.timeout" ~doc:"HTTP Request Timeouts" 7 module Log = (val Logs.src_log src : Logs.LOG) 8
+5
lib/timeout.mli
··· 1 (** Timeout configuration *) 2 3 (** Log source for timeout operations *)
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (** Timeout configuration *) 7 8 (** Log source for timeout operations *)
+11 -9
requests.opam
··· 2 opam-version: "2.0" 3 synopsis: "Clean Eio-style HTTPS client library for OCaml" 4 description: 5 - "A modern HTTP(S) client library for OCaml with Eio support, providing a clean API for making web requests with automatic TLS/CA certificate handling" 6 - maintainer: ["Your Name"] 7 - authors: ["Your Name"] 8 - license: "MIT" 9 - homepage: "https://github.com/username/requests" 10 - bug-reports: "https://github.com/username/requests/issues" 11 depends: [ 12 - "ocaml" 13 - "dune" {>= "3.0" & >= "3.0"} 14 "eio" 15 "cohttp-eio" 16 "tls-eio" ··· 21 "base64" 22 "logs" 23 "odoc" {with-doc} 24 ] 25 build: [ 26 ["dune" "subst"] {dev} ··· 36 "@doc" {with-doc} 37 ] 38 ] 39 - dev-repo: "git+https://github.com/username/requests.git"
··· 2 opam-version: "2.0" 3 synopsis: "Clean Eio-style HTTPS client library for OCaml" 4 description: 5 + "A modern HTTP(S) client library for OCaml with Eio support, providing a clean API for making web requests with automatic TLS/CA certificate handling. Inspired by Python's requests library, this provides a simple, intuitive interface for HTTP operations." 6 + maintainer: ["Anil Madhavapeddy <anil@recoil.org>"] 7 + authors: ["Anil Madhavapeddy"] 8 + license: "ISC" 9 + homepage: "https://tangled.org/@anil.recoil.org/ocaml-requests" 10 + bug-reports: "https://tangled.org/@anil.recoil.org/ocaml-requests/issues" 11 depends: [ 12 + "ocaml" {>= "5.1.0"} 13 + "dune" {>= "3.20" & >= "3.20"} 14 "eio" 15 "cohttp-eio" 16 "tls-eio" ··· 21 "base64" 22 "logs" 23 "odoc" {with-doc} 24 + "alcotest" {with-test & >= "1.7.0"} 25 + "eio_main" {with-test} 26 ] 27 build: [ 28 ["dune" "subst"] {dev} ··· 38 "@doc" {with-doc} 39 ] 40 ] 41 + x-maintenance-intent: ["(latest)"]
+5
test/test_localhost.ml
··· 1 (* Test conpool with 16 localhost servers on different 127.0.* addresses *) 2 3 open Eio.Std
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (* Test conpool with 16 localhost servers on different 127.0.* addresses *) 7 8 open Eio.Std
+5
test/test_localhost.mli
···
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 +
+5
test/test_simple.ml
··· 1 (* Simple test to debug connection issues *) 2 3 open Eio.Std
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 (* Simple test to debug connection issues *) 7 8 open Eio.Std
+5
test/test_simple.mli
···
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 +