[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: cohttp_lwt_mirage.ml / client
My common pattern is like this: -- instantiate Request and Response (I'm using a non-standard I/O module here, but you can use the cohttp mirage module IIRC) and then let request = Cohttp.Request.make ~meth:`PUT ~version:`HTTP_1_1 ~headers uri' in
Request.write (fun t _ -> return ()) request c >>= fun () -> Response.read (Cohttp_unbuffered_io.make_input c) >>= fun r -> begin match r with | None -> fail (Failure "Unable to parse HTTP response from server")
| Some x -> In the future I'd like a client which can handle a set of open connections (perhaps growing and shrinking the set according to load and policy) and which helps me build higher-level APIs on top which can do things like transparently login after a session times out.
On Tue, Nov 12, 2013 at 2:11 PM, Christopher Greenhalgh <Chris.Greenhalgh@xxxxxxxxxxxxxxxx> wrote: is there any news on the return of the cohttp client? Dave Scott
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |