package gapi-ocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type destination =
  1. | TargetFile of string
  2. | StringBuffer of Stdlib.Buffer.t
  3. | ArrayBuffer of (char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t
type download = {
  1. destination : destination;
  2. range_spec : string;
}
val destination : (download, destination) GapiLens.t
val range_spec : (download, string) GapiLens.t
val create_out_channel : download -> Netchannels.out_obj_channel
val create_in_channel : ?discard_on_close:bool -> download -> Netchannels.in_obj_channel
val generate_download_headers : download -> GapiCore.Header.t list
val generate_range_spec : (int64 option * int64 option) list -> string
type source =
  1. | File of string
  2. | String of string
  3. | Buffer of (char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t
type t = {
  1. source : source;
  2. name : string;
  3. content_type : string;
  4. content_length : int64;
}
val source : (t, source) GapiLens.t
val name : (t, string) GapiLens.t
val content_type : (t, string) GapiLens.t
val content_length : (t, int64) GapiLens.t
type state =
  1. | Request
  2. | Uploading
  3. | Done
  4. | Error
type upload_state = {
  1. state : state;
  2. resource : t;
  3. chunk_size : int;
  4. current_offset : int64;
}
val resource : (upload_state, t) GapiLens.t
val chunk_size : (upload_state, int) GapiLens.t
val current_offset : (upload_state, int64) GapiLens.t
val create_file_resource : string -> t
val setup_upload : ?chunk_size:int -> t -> upload_state
val setup_file_upload : ?chunk_size:int -> string -> upload_state
val generate_upload_headers : GapiCore.HttpMethod.t -> upload_state -> GapiCore.Header.t list
val update_upload_state : string -> upload_state -> upload_state
val get_post_data : upload_state -> GapiCore.PostData.t
OCaml

Innovation. Community. Security.