Skip to content

Interface cleanups before a 1.0 release

Compare
Choose a tag to compare
@avsm avsm released this 13 Apr 09:12
  • Interface change: The Request and Response module types now explictly
    signal Eof and Invalid (for errors), to help the backend distinguish them.
  • Interface change: Unify HTTP body handling across backends into a Cohttp.Body
    module. This is extended by Async/Lwt implementations with their specific
    ways of handling bodies (Pipes for Async, or Lwt_stream for Lwt).
  • [lwt] Interface change: HTTP client calls now raise Lwt exceptions rather
    than return an option type. This permits better error handling in Lwt.
  • [lwt] Interface change: The Server callback now always provides a body
    argument, since Cohttp_lwt_body now explicitly supports empty bodys.
  • Add Cohttp.Header.is_keep_alive to test if a connection should be reused.
  • [lwt] Respect the keep-alive header in the server request handling.
  • [async] Add a Body that takes a Pipe or a string, similarly to Lwt.
  • Install cohttp-server binary even if tests are disabled.
  • Begin an examples directory with some simple uses of the library.