[zeromq-dev] Send HTTP request and get response using ZeroMQ
Justin Karneges
justin at affinix.com
Thu Jan 9 10:26:32 CET 2014
Just connect to Zurl's REQ-handling endpoint (by default, tcp port 5553)
and send a tnetstring-formatted message. You can find a tnetstring PHP
library here: https://github.com/phuedx/tnetstring (note, I've not tried
this, as I'm not a PHP developer).
To make an HTTP request, send a message over the ZeroMQ socket with the
following fields:
id: a unique id for the request. could be a random number.
method: the request method (e.g. GET)
uri: the URL to request
All of the above fields are string types.
Zurl will then respond with a message containing the HTTP response.
On 01/08/2014 10:41 PM, Ravir Pandey wrote:
> I am not familiar with python :(
>
> Can you please explain a little bit?
>
>
> On Thu, Jan 9, 2014 at 2:02 AM, Justin Karneges <justin at affinix.com
> <mailto:justin at affinix.com>> wrote:
>
> Hi Ravir,
>
> You shouldn't need a PHP version of Zurl. Just run the daemon and then
> speak with it via ZeroMQ from any language. For reference, you can see
> tools/get.py which performs a GET request from Python.
>
> Fanout.io uses Zurl on its servers for various tasks, and we decided to
> open source the code in case others might find it useful.
>
> On 01/07/2014 11:33 PM, Ravir Pandey wrote:
> > and one thing i want to know is what's the role of Fanout.io
> service in
> > this?
> >
> >
> > On Wed, Jan 8, 2014 at 12:45 PM, Ravir Pandey
> > <ravir.pandey at commusoft.co.uk
> <mailto:ravir.pandey at commusoft.co.uk>
> <mailto:ravir.pandey at commusoft.co.uk
> <mailto:ravir.pandey at commusoft.co.uk>>> wrote:
> >
> > Hi Justin,
> >
> > I have gone through https://github.com/fanout/zurl. Sounds
> interesting.
> >
> > Is there any PHP version available?
> >
> >
> > On Mon, Jan 6, 2014 at 11:33 PM, Justin Karneges
> <justin at affinix.com <mailto:justin at affinix.com>
> > <mailto:justin at affinix.com <mailto:justin at affinix.com>>> wrote:
> >
> > On 01/05/2014 10:12 PM, Ravir Pandey wrote:
> > > Is there any way to send http request and get response
> from
> > server.
> > >
> > > For Ex. - i want to send request to my http server
> > http://341.23.43.21,
> > > after processing request i need a reply from same server.
> > >
> > > How can i achieve this?
> >
> > You can try using Zurl. It gateways REQ/REP to HTTP,
> using libcurl.
> >
> > Justin
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
> <mailto:zeromq-dev at lists.zeromq.org
> <mailto:zeromq-dev at lists.zeromq.org>>
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> >
> >
> >
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list