Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Ocsigen_http_frame.Result

module Result : sig..end

type result

The type of answers to send

val cookies : result -> Ocsigen_cookies.cookieset

accessor for cookies of result

val lastmodified : result -> float option

accessor for Last-Modified value of header of result

val etag : result -> string option

accessor for ETag value of header of result

val code : result -> int

accessor for response code of result

val stream : 
  result ->
  string Ocsigen_stream.t *
  (string Ocsigen_stream.t -> int64 -> string Ocsigen_stream.step Lwt.t)
  option

accessor for content of result

val content_length : result -> int64 option

accessor for Content-Length value of header of result

val content_type : result -> string option

accessor for Content-Type value of header of result

val headers : result -> Http_headers.t

accessor for HTTP header of result

val charset : result -> string option

accessor for charset of result

val location : result -> string option

accessor for location of result

val default : unit -> result

Default result to use as a base for constructing others.

val update : 
  result ->
  ?cookies:Ocsigen_cookies.cookieset ->
  ?lastmodified:float option ->
  ?etag:string option ->
  ?code:int ->
  ?stream:string Ocsigen_stream.t *
   (string Ocsigen_stream.t ->
   int64 -> string Ocsigen_stream.step Lwt.t)
   option ->
  ?content_length:int64 option ->
  ?content_type:string option ->
  ?headers:Http_headers.t ->
  ?charset:string option ->
  ?location:string option -> unit -> result

Update result before sending. If argument is unspecified, this function use old value of result.

val empty : unit -> result

result for an empty page.