main() argc/argv are set from Module.arguments, which is just a list of strings. You could copy the GET params from the url into that. I don't think we have a utility anywhere to do it automatically, although maybe emrun does that?
On Thu, Sep 10, 2015 at 8:51 AM, Robert Goulet <[email protected]> wrote: > Hi all, > > Is it possible to have an Emscripten generated html to take the http > parameters (GET or POST) and pass them to the C/C++ main as argc/argv? > > For example, browsing to: > > http://127.0.0.1:80/index.html?param1=hello¶m2=42 > > I would expect that in int main(int argc, char* argv[]) contains: > > argc = 5 > argv[0] = "index.html" > argv[1] = "param1" > argv[2] = "hello" > argv[3] = "param2" > argv[4] = "42" > > Or is there something equivalent that works just as well? > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
