[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cohttp_lwt_mirage.ml / client



Just a side note: I’ve got client hanging issues with cohttp.0.9.11 on unix 
sockets. Not totally sure how to fix it yet (apart from downgrading to 0.9.10). 
Haven’t checked if the problem is there with lwt_mirage.

Thomas

On 12 Nov 2013, at 14:30, David Scott <scott.dj@xxxxxxxxx> wrote:

> My common pattern is like this:
> 
> https://github.com/djs55/vhd-tool/blob/master/src/impl.ml#L592
> 
> -- 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?
> 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.