Results 1 to 3 of 3

Thread: Trouble sending request with QHttp

  1. #1
    Join Date
    Jun 2007
    Posts
    62
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Red face Trouble sending request with QHttp

    I'm trying to send some simple logging information with QHttp.

    Say if you type the following into your favorite web browser the logging will operate properly

    Qt Code:
    1. http://www.myCompany.com/myApp/myAppIns.php?source=xxx&object=yyyy
    To copy to clipboard, switch view to plain text mode 

    I tried the following but it does not seem to work:

    Qt Code:
    1. QHttp theHttp(this);
    2. theHttp.setHost("www.myCompany.com");
    3. theHttp.get("/myApp/myAppIns.php?source=xxx&object=yyyy");
    To copy to clipboard, switch view to plain text mode 
    Any ideas of what I am doing wrong?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trouble sending request with QHttp

    You create QHttp object on the stack, so it might go out of scope before the request gets processed.

  3. The following user says thank you to jacek for this useful post:

    WinchellChung (27th June 2007)

  4. #3
    Join Date
    Jun 2007
    Posts
    62
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Trouble sending request with QHttp

    Thanks jacek, that was it!
    I just knew it was some sort of stupid newbie mistake.
    Last edited by WinchellChung; 27th June 2007 at 19:24.

Similar Threads

  1. qt network performance
    By criss in forum Qt Programming
    Replies: 16
    Last Post: 24th July 2006, 09:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.