package cohttp-async

  1. Overview
  2. Docs

Module Cohttp_async.RequestSource

include Cohttp.S.Request with type t = Cohttp.Request.t
Sourcetype t = Cohttp.Request.t = {
  1. headers : Cohttp.Header.t;
    (*

    HTTP request headers

    *)
  2. meth : Cohttp.Code.meth;
    (*

    HTTP request method

    *)
  3. scheme : string option;
    (*

    URI scheme (http or https)

    *)
  4. resource : string;
    (*

    Request path and query

    *)
  5. version : Cohttp.Code.version;
    (*

    HTTP version, usually 1.1

    *)
  6. encoding : Cohttp.Transfer.encoding;
    (*

    transfer encoding of this HTTP request

    *)
}
include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval headers : t -> Cohttp.Header.t
Sourceval scheme : t -> string option
Sourceval resource : t -> string
Sourceval version : t -> Cohttp.Code.version
Sourceval compare : t -> t -> int
Sourceval make : ?meth:Cohttp.Code.meth -> ?version:Cohttp.Code.version -> ?encoding:Cohttp.Transfer.encoding -> ?headers:Cohttp.Header.t -> Uri.t -> t
Sourceval is_keep_alive : t -> bool

Return true whether the connection should be reused

Sourceval uri : t -> Uri.t
Sourceval make_for_client : ?headers:Cohttp.Header.t -> ?chunked:bool -> ?body_length:int64 -> Cohttp.Code.meth -> Uri.t -> t