Results 1 to 18 of 18

Thread: Http Posting using QNetworkAccessManager

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jan 2014
    Location
    Iran
    Posts
    15
    Qt products
    Platforms
    Unix/X11 Windows
    Thanks
    9

    Default Re: Http Posting using QNetworkAccessManager

    I edited my first code,I was thinking because my code is long it's looks ugly,thanks for mention that

    Quote Originally Posted by ChrisW67 View Post
    If your Qt code cannot even fetch a page from Apache (a GET) then you have more fundamental issues. You should work these out first.

    Read the docs for QNetworkReply::uploadProgress() again and ask yourself what happens if the total size cannot be determined.

    BTW: I do not see any reason from the close() call at all.
    you see,I need to upload through HTTP,at first when I was writing my first Qt program and did not know about HTTP stuff,I read data as a QByteArray and pass it to Uploader,after processing was done I could fetch the page and I could see contents,so uploadProgress is Ok,when I added QHttpMultiPart first of all I change data from QByteArray to QFile then pass it to Uploader and append data to multipart,at the end I posted QHttpMultiPart and request
    All I'm saying is Since I added QHttpMultiPart I can't fetch any pages,do you still think it's because QNetworkReply::uploadProgress() ?
    If I don't use close() or deleteLater() program will crash(seagment crash) or if you mean in UploadProgress it's because PyQt sometimes will post file twice(after uploading it start uploading again) I don't know it's my code or PyQt bug,but that solved my problem
    Last edited by Mohammadhzp; 21st January 2014 at 02:32.

Similar Threads

  1. Replies: 2
    Last Post: 8th January 2014, 16:40
  2. Replies: 4
    Last Post: 2nd May 2012, 13:51
  3. QNetworkAccessManager and http redirection
    By grayfox in forum Qt Programming
    Replies: 5
    Last Post: 8th July 2011, 18:24
  4. HTTP Post from QNetworkAccessManager - no data sent
    By secureboot in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2011, 19:46
  5. QNetworkAccessManager Http Basic Authentication?
    By jloundy in forum Qt Programming
    Replies: 5
    Last Post: 29th December 2010, 01:19

Tags for this Thread

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.