Re: URL with parameters in NetCGI
Gerd Stolpmann <[email protected]> Fri, 07 Mar 2014 17:17:13 +0100
| Newsgroups | gmane.comp.lang.ocaml.lib.net.devel |
|---|---|
| Message-ID | <1394209033.8827.0.camel@e130> |
--===============8005383795339389433== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-YhngfZXGmS/sATyXrg2N" --=-YhngfZXGmS/sATyXrg2N Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable You mean with nethttpd? Gerd Am Freitag, den 07.03.2014, 15:11 +0100 schrieb Pierre-Alexandre Voye: > Great ! So I can do that ! >=20 > On second thought, I think it would be great to be able to define > theses patterns in the conf file. >=20 > Where could I patch this ? >=20 >=20 >=20 > 2014-03-05 13:09 GMT+01:00 Gerd Stolpmann <[email protected]>: > Hi, > =20 > accessing the path is already possible. For example, if you > bind the cgi > to /service_name, and enter /service_name/some/path in the > browser, you > get the "excess part" of the path in > cgi#environment#cgi_path_info, i.e. > "/some/path". This should work for all cgi connectors in the > same way > (this behavior is part of the CGI standard). You could then > split the > path into components and process as you like. > =20 > Does this help? > =20 > Gerd > =20 > Am Dienstag, den 04.03.2014, 16:18 +0100 schrieb > Pierre-Alexandre Voye: > > HI, > > > > > > As far I understand my use of NetCGI, it only allow > GET/POST/... URLs > > with parameters like : > > > > /service_name?param1=3Done¶m2=3Dtwo > > > > > > > > > > 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 =3D 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 > > > =20 > > > -----------------------------------------------------------------= ------------- > > 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=3D122218951&iu=3D/4= 140/ostg.clktrk > > _______________________________________________ > Ocamlnet-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel > =20 > -- > ------------------------------------------------------------ > Gerd Stolpmann, Darmstadt, Germany [email protected] > My OCaml site: http://www.camlcity.org > Contact details: http://www.camlcity.org/contact.html > Company homepage: http://www.gerd-stolpmann.de > ------------------------------------------------------------ > =20 >=20 >=20 >=20 > --=20 > --------------------- > https://twitter.com/#!/ontologiae/ > http://linuxfr.org/users/montaigne >=20 > -------------------------------------------------------------------------= ----- > Subversion Kills Productivity. Get off Subversion & Make the Move to Perf= orce. > With Perforce, you get hassle-free workflows. Merge that actually works.= =20 > 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=3D122218951&iu=3D/4140/ostg= .clktrk > _______________________________________________ Ocamlnet-devel mailing li= st [email protected] https://lists.sourceforge.net/lists= /listinfo/ocamlnet-devel --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany [email protected] My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-YhngfZXGmS/sATyXrg2N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABAgAGBQJTGfEJAAoJEAaM4b9ZLB5TQvkH/0r+Buu1DMP5giM6J+GjGOkG vkECEBvSPiEy8JZCo/xnpPna/PqFzXoN258Ksq6LopfYNnFIfeex/WghNoFZ4Tey WdkV+cuJtwq9m7Pdc9AcEh1oj8gLqfU4cno5vlKWDbScHdUkc1/9omtGUUpgqKgV +waBP07tyYyZ2sy8at8GJOfXeJI8D2yhFa0SXriV977OvqDoub3zQucpx60jkMgN kKELyiyyAKHavWWOXUpstNtMasxKmW1PbOdt6uh6zomHWJ+kfMJvhZ9jIeDo1OSo DtJ4714VPPWD8gVnGwfo5oO0MZ9XJ5qfYRDd348hQtfjs3tVAvgWFKsuu7+H9uw= =ItVR -----END PGP SIGNATURE----- --=-YhngfZXGmS/sATyXrg2N-- --===============8005383795339389433== 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 --===============8005383795339389433== 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 --===============8005383795339389433==--