From: Pierre-Alexandre V. <ont...@gm...> - 2014-03-07 14:11:46
|
Great ! So I can do that ! On second thought, I think it would be great to be able to define theses patterns in the conf file. Where could I patch this ? 2014-03-05 13:09 GMT+01:00 Gerd Stolpmann <in...@ge...>: > Hi, > > 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. > > Does this help? > > Gerd > > 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=one¶m2=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 > > > > > ------------------------------------------------------------------------------ > > 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 > > _______________________________________________ Ocamlnet-devel mailing > list Oca...@li... > https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel > > -- > ------------------------------------------------------------ > Gerd Stolpmann, Darmstadt, Germany ge...@ge... > My OCaml site: http://www.camlcity.org > Contact details: http://www.camlcity.org/contact.html > Company homepage: http://www.gerd-stolpmann.de > ------------------------------------------------------------ > > -- --------------------- https://twitter.com/#!/ontologiae/ http://linuxfr.org/users/montaigne |