URL with parameters in NetCGI

Pierre-Alexandre Voye <[email protected]> Tue, 4 Mar 2014 16:18:37 +0100
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <CANnJ5Gc1tT-ykTAbkdcGQPyV9rpZLHymQmtTHXZCEAhbjPqr_A@mail.gmail.com>
--===============2002126766291347592==
Content-Type: multipart/alternative; boundary=001a11c11ed84570a004f3c96c9d

--001a11c11ed84570a004f3c96c9d
Content-Type: text/plain; charset=UTF-8

HI,

As far I understand my use of NetCGI, it only allow GET/POST/... URLs with
parameters like :
/service_name?param1=one&param2=two

It's now usual, according to REST philosophy, to write URLs as follow :
GET /table_name/17
PUT /table_name/17
and of course more complex URLs as :
PUT /publishers/1/magazines/2/photos/3


However there's ocaml's library to do that (aka
https://github.com/rgrinberg/opium which user cohttp based on Lwt/Async),
NetCGI is so powerful and multicore ready that I would prefer to use it.
With opium you can format your URLs as follow :

let print_person = get "/person/:name/:age" ...



So, is there a way to do that with NetCGI ? Or, if I want to contribute by
coding it, what, Gerd, would be the way you prefer to patch NetCGI ?


Regards,

Pierre-Alexandre



-- 
---------------------
https://twitter.com/#!/ontologiae/
http://linuxfr.org/users/montaigne

--001a11c11ed84570a004f3c96c9d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div><div><div><div>HI,<br><br></div>A=
s far I understand my use of NetCGI, it only allow GET/POST/... URLs with p=
arameters like :<br></div>/service_name?param1=3Done&amp;param2=3Dtwo<br></=
div>

<div></div><div><br></div>It&#39;s now usual, according to REST philosophy,=
 to write URLs as follow :<br></div>GET /table_name/17<br></div>PUT /table_=
name/17<br></div>and of course more complex URLs as :<br></div>PUT <code cl=
ass=3D"">/publishers/1/magazines/2/photos/3<br>

<br></code><br>However there&#39;s ocaml&#39;s library to do that (aka=20
<a href=3D"https://github.com/rgrinberg/opium">https://github.com/rgrinberg=
/opium</a> which user cohttp based on Lwt/Async), NetCGI is so powerful and=
 multicore
 ready that I would prefer to use it.<br></div><div>With opium you can form=
at your URLs as follow :<br><pre><code>let print_person =3D get &quot;/pers=
on/:name/:age&quot; ...</code></pre><br></div><div><br></div><div>So, is th=
ere a way to do that with NetCGI ? Or, if I want to contribute by coding it=
, what, Gerd, would be the way you prefer to patch NetCGI ?<br>

<br><br></div><div>Regards,<br><br></div><div>Pierre-Alexandre<br></div><di=
v><br></div><code class=3D""><br></code><div><div><div><div><div><div><div>=
<div><div><br>-- <br>---------------------<br><a href=3D"https://twitter.co=
m/#%21/ontologiae/" target=3D"_blank">https://twitter.com/#!/ontologiae/</a=
><br>

<a href=3D"http://linuxfr.org/users/montaigne" target=3D"_blank">http://lin=
uxfr.org/users/montaigne</a><br>
</div></div></div></div></div></div></div></div></div></div>

--001a11c11ed84570a004f3c96c9d--


--===============2002126766291347592==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
--===============2002126766291347592==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel

--===============2002126766291347592==--