[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] iterating over every query argument for a GET request?
From: |
Basile Starynkevitch |
Subject: |
[libmicrohttpd] iterating over every query argument for a GET request? |
Date: |
Sun, 14 Nov 2010 22:48:58 +0100 |
Hello,
Assuming a libmicrohttpd application is recieving a GET request for an
URL like http://localhost:8086/foo/bar?x1=a&x2=b&y=c
is there some way to iterate on every query argument (e.g. x1, x2, y in
that case)?
I did look into the querystring_example.c and know about the
MHD_lookup_connection_value (connection,
MHD_GET_ARGUMENT_KIND,
argname)
function call, but what should I do if I don't know the possible
argname-s and want to iterate on all of them?
Is there some way to register a get argument iterator function
which (in the same example) would be called 3 times:
first, with key ="x1" and value = "a"
second, with key = "x2" and value = "b"
third, with key = "y" and value = "c"
Or (less pleasant, but manageable) is there some way to get the entire URL
string
"/foo/bar?x1=a&x2=b&y=c" which I would have to parse myself?
Cheers.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
- [libmicrohttpd] iterating over every query argument for a GET request?,
Basile Starynkevitch <=