[Qt-interest] Help Required to Perform HTTP Put usingQNetworkAccessManger

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Wed Dec 1 11:24:11 CET 2010


 

-----Original Message-----

Hello Mandeep and Thiago 

Thanks for your reply.

I am pretty sure that i am giving the correct credentials as using that
credentials i am able to perform other post calls in my application. 

Then also i will again confirm that.

@mandeep, yes i am getting the same output, i have widget using which i am
doing this which has a button and textbrowser to see the output.

But i am not getting the valid output. :-(

Are you guys very much sure that the way i am making put is correct, i dont
know why but i feel something is wrong in there. 
 

 
Hi Gargi, 
 
I've never used PUT, and never found heard of a server that accepts them -
as the Qt docs confirm.  Nonetheless, you are setting up query parameters,
and then you pass them as data: 
 
nam->put(request,data);

I'm pretty sure the query parameters have to be part of the url itself in
the request, not the data.  It looks suspicious that you have to remove the
first character of the parameters - the '?'. 
 
What is the actual data that you want to put onto the server - surely not
the login credentials?  Are you sure that PUT is required, and not just GET?
Or are you trying to imitate filling in a login form, which would require
POST?  
 
In these situations, I find using Firefox with the 'Live HTTP headers'
add-on invaluable. 
 
Tony.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101201/49dc6091/attachment.html 


More information about the Qt-interest-old mailing list