Results 1 to 14 of 14

Thread: How do I send data with http post request?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How do I send data with http post request?

    Did you remember about the extra newline after the last header?

  2. #2
    Join Date
    Feb 2006
    Posts
    209
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How do I send data with http post request?

    I've added both \n and \n\n after ContentLength: 17 but no success.
    If anyone can re-write it properly, feel free to do so, because I can't make it work

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How do I send data with http post request?

    Take a network sniffer or netcat and see what the difference is.

  4. #4
    Join Date
    Feb 2006
    Posts
    209
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How do I send data with http post request?

    Well the difference is big. The real webbrowser gives this extra information

    Qt Code:
    1. User-Agent: Links (2.2; Linux 2.6.25-gentoo-r7 x86_64; 150x41)
    2. Accept: */*
    3. Accept-Encoding: gzip, deflate, bzip2
    4. Accept-Charset: us-ascii, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, windows-1250, windows-1251, windows-1252, windows-1256, windows-1257, cp437, cp737, cp850, cp852, cp866, x-cp866-u, x-mac, x-mac-ce, x-kam-cs, koi8-r, koi8-u, koi8-ru, TCVN-5712, VISCII, utf-8
    5. Accept-Language: en, *;q=0.1
    6. Connection: Keep-Alive
    7. Content-Type: application/x-www-form-urlencoded
    To copy to clipboard, switch view to plain text mode 

    And I can not add any of these without adding them to the path.

Similar Threads

  1. Send Base64 encoded data
    By rmagro in forum Qt Programming
    Replies: 6
    Last Post: 29th October 2007, 16:58

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
  •  
Qt is a trademark of The Qt Company.