yes i tried that class also . but i couldnt get it work. Maybe i am using that wrong.
When using QTcpSocket i connect to the proxy server.
Qt Code:
s.connectToHost("yy.yy.yy.yy",8080);// yy.yy.yy.yy:8080 is the proxy addressTo copy to clipboard, switch view to plain text mode
and send server the message below;
POST http://xx.xx.xx.xx/ HTTP/1.1
User-Agent: TSS Client
Host: xx.xx.xx.xx
Proxy-Connection: Keep-Alive
Content-Length: 61
Content-Type: application/timestamp-query
Identity: 304d0201010410a6ee0e6ddf04fd7e0f36a41708071a850202 07d004105f0ffc985e9c03361f5e11d8bf674e10042007320d c4190c712f1dfb94ced2e983a886674d2a9600ca3fec5e5c56 31e9d73c
<...requestbody...>
how can i do the same with QNetworkAccessManager?
I read the doc about QNetworkAccessManager;
I set the proxy of manager with setProxy() and tried post(...) method with several combinations , connected all of the signals it emits to slots. but couldnt see anything coming from the server.
can you explain how can i use QNetworkAccessManager to make the above request.?
How should i init QNetworkRequest object when posting? should i post to my destination(xx.xx.xx.xx)
or the proxy server(yy.yy.yy.yy).
a piece of code ?
thanks.




Reply With Quote

Bookmarks