Skip to content
  • 0 Votes
    2 Posts
    3k Views
    SGaistS
    Hi, Why are you creating your request on the heap rather than stack ? Also, you never delete the request so you might be covering one with another and you have a memory leak.
  • How to know if QNetworkReply has a body?

    Solved General and Desktop qnetworkreply
    6
    0 Votes
    6 Posts
    2k Views
    SGaistS
    You're welcome ! Since the point has been clarified, please mark the thread as solved using the "Topic Tool" button so other forum users may know a solution has been found :)
  • 0 Votes
    7 Posts
    4k Views
    T
    @SGaist Hi, I resolved the issue. I was actually firing sendCustomRequest() api as I was using a specific url query in request which was needed in to fire via HEAD method. Before firing sendCustomRequest() api I was also creating & resetting my ssl configuration. So, instead I directly now use the head() api to fire my HEAD request. Now,finished signal by reply gets fired instantaneously & I am able to read my specific header value in response in no time. Thanks for your time..!! :)
  • 0 Votes
    6 Posts
    2k Views
    SGaistS
    You're welcome ! Since you have it working now, please update the thread title prepending [solved] so other forums users may know a solution has been found :)
  • [Solved]QNetworkReply

    General and Desktop qnetworkreply
    5
    0 Votes
    5 Posts
    1k Views
    S
    @chronix Sounds like you are well down the road of writing code to do this... But for the sake of options and if you happen to be running on Windows, there is a fairly inexpensive tool that does all of this for you: http://wyday.com/wybuild/ I've used this tool on both small and large projects and it makes updates a snap. It handles virtually any types of files and can be command line driven.
  • 0 Votes
    5 Posts
    2k Views
    Chris KawaC
    @Franckynos said: But there isn't way to have a real progression ? It depends on whether or not the server sends correct Content-Length field in the header. It's not like Qt can magically guess the value if the server didn't send it. It's a bullshit to remove QFtp class. Huh. What does that out of context comment have to do with the issue? I can't have size of file with some request ? See above.
  • 0 Votes
    1 Posts
    658 Views
    No one has replied
  • 0 Votes
    2 Posts
    3k Views
    benlauB
    Not quite understand your question.. Generally speaking, Javascript application use a Promise object for deferred and asynchronous operation. For example , do something when two or more asynchronous operations completed (in any order). Qt do not bundle any Promise implementation by default. You could get a one from my github repo: benlau/quickpromise Example Promise { resolveWhen: Q.all([endpoint1. onReplyStatusChanged,endpoint2. onReplyStatusChanged]); onFulfilled: { // It will be triggered only if both of the endpoint emitted the signal controller.setData1(); controller.setData2(); } }
  • 0 Votes
    2 Posts
    2k Views
    S
    I figured out what is going on, sort of. download_content in QByteArray seems to contains ^M (MSDOS newline) in some parts of the file when written to dump. When written to the desired file, it does not have those. Later on, in compareDownload the QBytearray does ontain the "^M" characters and the written file does not, therefore their bytes are different by x*^M. I currently do not understand why ^M is there and then not when written and I do not know how to remove from the QByteArray in the compareDownload function. Also during my tests to figure this out, QByteArray new_contents saves to file with ^M once I added that in there to compare with QByteArray file_byte_array. Edit: Actually the regular file that becomes file_byte_array does have the ^M, but the QByteArray that reads the file lacks it.
  • 0 Votes
    18 Posts
    15k Views
    SGaistS
    Use setRawHeader from QNetworkRequest with Authorization as the name