Thanks, Dave. Unfortunately it turns out it is a HTTPS-only API (and I should also be using https for my server for a “real” deployment) so can someone comment on the status/timeline of https support, client and server? Cheers Chris From: cl-mirage-bounces@xxxxxxxxxxxxxxx [mailto:cl-mirage-bounces@xxxxxxxxxxxxxxx] On Behalf Of David Scott Sent: 12 November 2013 14:31 To: Christopher Greenhalgh Cc: cl-mirage@xxxxxxxxxxxxxxx; anil@xxxxxxxxxx Subject: 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 -> | None -> fail (Failure "Unable to parse HTTP response from server") 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? I need to start making some HTTP requests from my mirage-based web service... What is the best ultra-short-term workaround? (i am mostly developing on unix/sockets) cheers chris This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
-- Dave Scott
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
|