U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » HttpQuery - not working?
HttpQuery - not working? [message #28034] Fri, 13 August 2010 13:32 Go to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
What's wrong with this program? I would have expected it to print 'John'. Instead it's output is:

Name=


The program


CONSOLE_APP_MAIN
{
  HttpQuery q("http://google.com?name=John");
  Cout() << "Name=" << q.GetString("name") << "\n";
}


Thanks,

Jeremy
Re: HttpQuery - not working? [message #28100 is a reply to message #28034] Mon, 16 August 2010 08:59 Go to previous message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
Ah, I got it. I set out to fix this "bug" this morning and when stepping through the debugger it hit me. The key is converted to Upper Case.

Thus:

CONSOLE_APP_MAIN
{
  HttpQuery q("http://google.com?name=John");
  Cout() << "Name=" << q.GetString("NAME") << "\n";
}


works.

Jeremy
Previous Topic: HTTP Client and file upload
Next Topic: MT again
Goto Forum:
  


Current Time: Tue Apr 28 12:18:59 GMT+2 2026

Total time taken to generate the page: 0.00525 seconds