package_name stringlengths 2 45 | version stringclasses 302
values | license stringclasses 51
values | homepage stringclasses 382
values | dev_repo stringclasses 379
values | file_type stringclasses 6
values | file_path stringlengths 4 151 | file_content stringlengths 0 13.6M |
|---|---|---|---|---|---|---|---|
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | dune | uspf-0.2.1/lib-lwt/dune | (library
(name uspf_lwt)
(public_name uspf-lwt)
(libraries uspf dns-client-lwt lwt))
|
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | ml | uspf-0.2.1/lib-lwt/uspf_lwt.ml | open Lwt.Infix
external reraise : exn -> 'a = "%reraise"
let ( % ) f g = fun x -> f (g x)
let eval : type a.
dns:Dns_client_lwt.t -> a Uspf.t -> Uspf.Result.t option Lwt.t =
fun ~dns t ->
let rec go : type a. a Uspf.t -> a Lwt.t = function
| Request (domain_name, record, fn) ->
Dns_client_lwt.get_... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | mli | uspf-0.2.1/lib-lwt/uspf_lwt.mli | (** LWT layer of uSPF.
uSPF is a standalone library which requires some specialisations like the
{i scheduler} and the DNS stack used to get DNS record. This module
specialises specifically the scheduler with LWT. It lets the user to choose
the DNS implementation {i via} a first-class module (see
{... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | dune | uspf-0.2.1/lib-mirage/dune | (library
(name uspf_mirage)
(public_name uspf-mirage)
(libraries uspf lwt dns-client-mirage))
|
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | ml | uspf-0.2.1/lib-mirage/uspf_mirage.ml | open Lwt.Infix
external reraise : exn -> 'a = "%reraise"
let ( % ) f g = fun x -> f (g x)
module Make (Dns_client : Dns_client_mirage.S) = struct
let eval : type a. dns:Dns_client.t -> a Uspf.t -> Uspf.Result.t option Lwt.t
=
fun ~dns t ->
let rec go : type a. a Uspf.t -> a Lwt.t = function
| Re... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | mli | uspf-0.2.1/lib-mirage/uspf_mirage.mli | module Make (Dns_client : Dns_client_mirage.S) : sig
val get_and_check : Dns_client.t -> Uspf.ctx -> Uspf.Result.t option Lwt.t
end
|
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | dune | uspf-0.2.1/lib-unix/dune | (library
(name uspf_unix)
(public_name uspf.unix)
(libraries unix dns-client.unix uspf))
|
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | ml | uspf-0.2.1/lib-unix/uspf_unix.ml | let eval : type a. dns:Dns_client_unix.t -> a Uspf.t -> Uspf.Result.t option =
fun ~dns t ->
let rec go : type a. a Uspf.t -> a = function
| Request (domain_name, record, fn) ->
let resp = Dns_client_unix.get_resource_record dns record domain_name in
go (fn resp)
| Return v -> v
| Tries f... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | mli | uspf-0.2.1/lib-unix/uspf_unix.mli | (** Unix layer of uSPF.
uSPF is a standalone library which requires some specialisations like the
{i scheduler} and the DNS stack used to get DNS records. This module
specialises uSPF with the module [Unix] and [ocaml-dns]. {!val:check} does
the SPF verification from a given {!type:Uspf.ctx} and
{!... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | dune | uspf-0.2.1/lib/dune | (library
(name uspf)
(public_name uspf)
(libraries
colombe.emile
mrmime
dns
logs
colombe
ipaddr
hmap
angstrom
domain-name))
|
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | ml | uspf-0.2.1/lib/map.ml | type 'a tag = { name: string; pp: 'a Fmt.t; equal: 'a -> 'a -> bool }
module Info = struct
type 'a t = 'a tag = { name: string; pp: 'a Fmt.t; equal: 'a -> 'a -> bool }
end
include Hmap.Make (Info)
let pp_local ppf = function
| `String x -> Fmt.(quote string) ppf x
| `Dot_string l -> Fmt.(list ~sep:(const strin... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | ml | uspf-0.2.1/lib/uspf.ml | let error_msgf fmt = Fmt.kstr (fun msg -> Error (`Msg msg)) fmt
let failwith_error_msg = function Ok v -> v | Error (`Msg err) -> failwith err
let ( >>| ) x f = Result.map f x
let ( % ) f g x = f (g x)
let src = Logs.Src.create "spf"
module Log = (val Logs.src_log src : Logs.LOG)
type mechanism =
| A of [ `raw ] Do... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | mli | uspf-0.2.1/lib/uspf.mli | (** {1 (Un)Sender Policy Framework.}
uSPF is a framework to check the identity of the email's sender. When an
email passes through an SMTP server, some informations are available such as
the source of the email, the IP address (because the sender must initiate a
TCP/IP connexion).
From these infor... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | dune | uspf-0.2.1/test/dune | (executable
(name test_macro)
(libraries logs.fmt rresult uspf alcotest))
(rule
(alias runtest)
(action
(run ./test_macro.exe --color=always)))
|
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | ml | uspf-0.2.1/test/test_macro.ml | open Rresult
let msg = Alcotest.testable Rresult.R.pp_msg ( = )
let ( % ) f g x = f (g x)
let reporter ppf =
let report src level ~over k msgf =
let k _ = over () ; k () in
let with_metadata header _tags k ppf fmt =
Format.kfprintf k ppf
("%a[%a]: " ^^ fmt ^^ "\n%!")
Logs_fmt.pp_header... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | opam | uspf-0.2.1/uspf-lwt.opam | version: "0.2.1"
opam-version: "2.0"
name: "uspf"
maintainer: "Romain Calascibetta <romain.calascibetta@gmail.com>"
authors: "Romain Calascibetta <romain.calascibetta@gmail.com>"
homepage: "https://github.com/mirage/uspf"
bug-reports: "https://github.com/mirage/uspf/issues"
dev-repo: "git+https:... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | opam | uspf-0.2.1/uspf-mirage.opam | version: "0.2.1"
opam-version: "2.0"
name: "uspf"
maintainer: "Romain Calascibetta <romain.calascibetta@gmail.com>"
authors: "Romain Calascibetta <romain.calascibetta@gmail.com>"
homepage: "https://github.com/mirage/uspf"
bug-reports: "https://github.com/mirage/uspf/issues"
dev-repo: "git+https:... |
uspf | 0.2.1 | MIT | https://github.com/mirage/uspf | git+https://github.com/mirage/uspf.git | opam | uspf-0.2.1/uspf.opam | version: "0.2.1"
opam-version: "2.0"
name: "uspf"
maintainer: "Romain Calascibetta <romain.calascibetta@gmail.com>"
authors: "Romain Calascibetta <romain.calascibetta@gmail.com>"
homepage: "https://github.com/mirage/uspf"
bug-reports: "https://github.com/mirage/uspf/issues"
dev-repo: "git+https:... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | opam | cohttp-6.2.1/cohttp-async.opam | version: "6.2.1"
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "CoHTTP implementation for the Async concurrency library"
description: """
An implementation of an HTTP client and server using the Async
concurrency library. See the `Cohttp_async` module for information
on how t... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/bin/cohttp_curl_async.ml | (*{{{ Copyright (c) 2014 Anil Madhavapeddy <anil@recoil.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" A... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/bin/cohttp_server_async.ml | (*{{{ Copyright (c) 2013 Anil Madhavapeddy <anil@recoil.org>
* Copyright (c) 2014 David Sheets <sheets@alum.mit.edu>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appea... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | dune | cohttp-6.2.1/cohttp-async/bin/dune | (executables
(names cohttp_curl_async cohttp_server_async)
(libraries
cohttp-async
async_kernel
async.async_command
async_unix
base
cohttp
cohttp_server
fmt.tty
core_unix.command_unix))
|
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | dune | cohttp-6.2.1/cohttp-async/examples/dune | (executables
(names hello_world receive_post)
(libraries
digestif.c
http
cohttp-async
base
async_kernel
core_unix.command_unix))
(alias
(name runtest)
(package cohttp-async)
(deps hello_world.exe receive_post.exe))
|
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/examples/hello_world.ml | (* This file is in the public domain *)
open Core
open Async_kernel
module Server = Cohttp_async.Server
(* given filename: hello_world.ml compile with:
$ corebuild hello_world.native -pkg cohttp.async
*)
let handler ~body:_ _sock req =
let uri = Cohttp.Request.uri req in
match Uri.path uri with
| "/test" ->
... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/examples/receive_post.ml | (* This file is in the public domain *)
open Base
open Async_kernel
module Body = Cohttp_async.Body
module Server = Cohttp_async.Server
(* compile with: $ corebuild receive_post.native -pkg cohttp.async *)
let start_server port () =
Stdlib.Printf.eprintf "Listening for HTTP on port %d\n" port;
Stdlib.Printf.eprin... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/examples/s3_cp.ml | (*{{{ Copyright (C) 2015 Trevor Smith <trevorsummerssmith@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/src/body.ml | open Base
open Async_kernel
module B = Cohttp.Body
type t = [ B.t | `Pipe of string Pipe.Reader.t ] [@@deriving sexp_of]
let empty = `Empty
let of_string s = (B.of_string s :> t)
let of_pipe p = `Pipe p
let to_string = function
| #B.t as body -> return (B.to_string body)
| `Pipe s -> Pipe.to_list s >>| String.co... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | mli | cohttp-6.2.1/cohttp-async/src/body.mli | open! Base
open! Async_kernel
type t = [ Cohttp.Body.t | `Pipe of string Pipe.Reader.t ] [@@deriving sexp_of]
include Cohttp.S.Body with type t := t
val to_string : t -> string Deferred.t
val to_string_list : t -> string list Deferred.t
val to_pipe : t -> string Pipe.Reader.t
val of_pipe : string Pipe.Reader.t -> t
... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/src/client.ml | open Base
open Async_kernel
open Async_unix
module Net = struct
let lookup uri =
let host = Uri.host_with_default ~default:"localhost" uri in
match Uri_services.tcp_port_of_uri ~default:"http" uri with
| None ->
Deferred.Or_error.error_string
"Net.lookup: failed to get TCP port form Uri... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | mli | cohttp-6.2.1/cohttp-async/src/client.mli | val request :
?interrupt:unit Async_kernel.Deferred.t ->
?ssl_config:Conduit_async.V2.Ssl.Config.t ->
?uri:Uri.t ->
?body:Body.t ->
Http.Request.t ->
(Http.Response.t * Body.t) Async_kernel.Deferred.t
(** Send an HTTP request with an arbitrary body The request is sent as-is. *)
val call :
?interrupt:unit... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/src/cohttp_async.ml | module Body = Body
module Body_raw = Body [@@deprecated "Use Body"]
module Client = Client
module Io = Io [@@deprecated "This module is not for public consumption"]
module Request = Cohttp.Request [@@deprecated "Use Cohttp.Request directly"]
module Response = Cohttp.Response [@@deprecated "Use Cohttp.Response directly"... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | dune | cohttp-6.2.1/cohttp-async/src/dune | (library
(name cohttp_async)
(synopsis "Async backend")
(public_name cohttp-async)
(libraries
logs.fmt
base
fmt
async_unix
async_kernel
uri
uri.services
uri-sexp
ipaddr.unix
conduit-async
magic-mime
http
http_bytebuffer
cohttp)
(preprocess
(pps ppx_sexp_conv)))
|
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/src/input_channel.ml | open! Core
open! Async
module Bytebuffer = struct
module Bytebuffer = Http_bytebuffer.Bytebuffer
include Bytebuffer
include
Bytebuffer.Make
(Deferred)
(struct
type src = Reader.t
let refill reader buf ~pos ~len = Reader.read reader ~pos ~len buf
end)
end
type t = { buf : ... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | mli | cohttp-6.2.1/cohttp-async/src/input_channel.mli | open Async
type t
val create : ?buf_len:int -> Reader.t -> t
val read_line_opt : t -> string option Deferred.t
val read : t -> int -> string Deferred.t
val refill : t -> [ `Eof | `Ok ] Deferred.t
val with_input_buffer : t -> f:(string -> pos:int -> len:int -> 'a * int) -> 'a
val is_closed : t -> bool
val close : t ->... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/src/io.ml | (*{{{ Copyright (c) 2012-2013 Anil Madhavapeddy <anil@recoil.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS ... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | mli | cohttp-6.2.1/cohttp-async/src/io.mli | (*{{{ Copyright (c) 2013 Anil Madhavapeddy <anil@recoil.org>
*
* Permission to use, copy, modify, and distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies. THE SOFTWARE IS PROVIDED "AS IS" AND... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/src/server.ml | open Base
open Async_kernel
open Async_unix
type ('address, 'listening_on) t = {
server : ('address, 'listening_on) Tcp.Server.t; [@sexp.opaque]
}
[@@deriving sexp_of]
let num_connections t = Tcp.Server.num_connections t.server
type response = Cohttp.Response.t * Body.t [@@deriving sexp_of]
type response_action =... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | mli | cohttp-6.2.1/cohttp-async/src/server.mli | type ('address, 'listening_on) t
constraint 'address = [< Async_unix.Socket.Address.t ]
[@@deriving sexp_of]
val close : (_, _) t -> unit Async_kernel.Deferred.t
val close_finished : (_, _) t -> unit Async_kernel.Deferred.t
val is_closed : (_, _) t -> bool
val listening_on : (_, 'listening_on) t -> 'listening_on
val... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/test/cohttp_async_test/src/cohttp_async_test.ml | open Base
open Async_kernel
open OUnit
module Server = Cohttp_async.Server
module Body = Cohttp_async.Body
type 'a io = 'a Deferred.t
type ic = Async_unix.Reader.t
type oc = Async_unix.Writer.t
type body = Body.t
type response_action =
[ `Expert of Http.Response.t * (ic -> oc -> unit io)
| `Response of Http.Respo... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | mli | cohttp-6.2.1/cohttp-async/test/cohttp_async_test/src/cohttp_async_test.mli | open Async_kernel
include
Cohttp_test.S
with type 'a io = 'a Deferred.t
and type body = Cohttp_async.Body.t
and type ic = Async_unix.Reader.t
and type oc = Async_unix.Writer.t
val run_async_tests : OUnit.test io -> OUnit.test_result list Deferred.t
|
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | dune | cohttp-6.2.1/cohttp-async/test/cohttp_async_test/src/dune | (library
(name cohttp_async_test)
(libraries fmt.tty uri.services async_kernel cohttp_test cohttp-async))
|
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | dune | cohttp-6.2.1/cohttp-async/test/dune | (executable
(name test_async_integration)
(libraries
cohttp_async_test
async_unix
base
core
async_kernel
ounit2
cohttp-async))
(rule
(alias runtest)
(package cohttp-async)
(action
(run ./test_async_integration.exe)))
|
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-async/test/test_async_integration.ml | open Base
open Async_kernel
open OUnit
open Cohttp
open Cohttp_async_test
module Server = Cohttp_async.Server
module Client = Cohttp_async.Client
module Body = Cohttp_async.Body
let chunk_body = [ "one"; ""; " "; "bar"; "" ]
let large_string = String.make (Int.pow 2 16) 'A'
let response_bodies = [ "Testing"; "Foo bar"... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | opam | cohttp-6.2.1/cohttp-bench.opam | version: "6.2.1"
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Benchmarks binaries for Cohttp"
description: """
This package contains some benchmarks for http and cohttp.
The benchmarks for the server latency will require wrk2
(https://github.com/giltene/wrk2) to run. The la... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-bench/async_server.ml | open Core
open Async
module Server = Cohttp_async.Server
let length = 2053
let text = String.make length 'a'
let headers = Cohttp.Header.of_list [ ("content-length", Int.to_string length) ]
let handler ~body:_ _sock _req = Server.respond_string ~headers text
let start_server port () =
Cohttp_async.Server.create ~on... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-bench/bench.ml | module Command = Core.Command
module Staged = Core.Staged
open Core_bench
let header_names =
[
"Accept";
"Accept-Encoding";
"Accept-Language";
"Cache-Control";
"Connection";
"Host";
"If-Modified-Since";
"If-None-Match";
"Origin";
"Referer";
"Sec-Fetch-Dest";
"Sec-Fetch... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | dune | cohttp-6.2.1/cohttp-bench/dune | (executable
(name bench)
(modules bench)
(libraries http core core_unix.command_unix core_bench))
(executable
(name lwt_unix_server)
(modules lwt_unix_server)
(libraries cohttp-lwt-unix logs.fmt fmt.tty))
(executable
(name async_server)
(modules async_server)
(libraries cohttp-async core_unix.command_unix lo... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-bench/eio_server.ml | open Cohttp_eio
let length = 2053
let text = String.make length 'a'
let headers = Cohttp.Header.of_list [ ("content-length", Int.to_string length) ]
let server_callback _conn _req _body =
Server.respond_string ~headers ~status:`OK ~body:text ()
let () =
let port = ref 8080 in
Arg.parse
[ ("-p", Arg.Set_int... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-bench/lwt_unix_server.ml | module Server = Cohttp_lwt_unix.Server
let length = 2053
let text = String.make length 'a'
let headers = Cohttp.Header.of_list [ ("content-length", Int.to_string length) ]
let server_callback _conn _req _body =
Server.respond_string ~headers ~status:`OK ~body:text ()
let main () =
Server.create ~backlog:11_000 (... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-bench/lwt_unix_server_new.ml | open Lwt.Syntax
module Context = Cohttp_server_lwt_unix.Context
module Body = Cohttp_server_lwt_unix.Body
let text = String.make 2053 'a'
let server_callback ctx =
Lwt.join
[
Context.discard_body ctx;
Context.respond ctx (Http.Response.make ()) (Body.string text);
]
let main () =
let* _server... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | mli | cohttp-6.2.1/cohttp-bench/lwt_unix_server_new.mli | |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | opam | cohttp-6.2.1/cohttp-curl-async.opam | version: "6.2.1"
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Cohttp client using Curl & Async as the backend"
description: """
An HTTP client that relies on Curl + Async for the backend. Does not require
conduit for SSL."""
maintainer: ["Anil Madhavapeddy <anil@recoil.org>... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | ml | cohttp-6.2.1/cohttp-curl-async/bin/curl.ml | open Cohttp
module Curl = Cohttp_curl_async
module Sexp = Sexplib0.Sexp
open Async_kernel
module Writer = Async_unix.Writer
module Time = Core.Time_float
let ( let* ) x f = Deferred.bind x ~f
let client uri meth' () =
let meth = Cohttp.Code.method_of_string meth' in
let reply =
let context = Curl.Context.crea... |
cohttp-top | 6.2.1 | ISC | https://github.com/mirage/ocaml-cohttp | git+https://github.com/mirage/ocaml-cohttp.git | dune | cohttp-6.2.1/cohttp-curl-async/bin/dune | (executable
(name curl)
(libraries
sexplib0
cohttp
cohttp_curl_async
core_kernel
async_unix
async_kernel
async.async_command
core_unix.command_unix))
|
End of preview. Expand in Data Studio
This is a dataset automatically generated from ocaml/opam:archive. You can find more information about this dataset in this blogpost.
- Downloads last month
- 792