PDA

View Full Version : Using QHttp for authentication required



anoop7181
7th September 2010, 07:00
I am working in Qt 4.3...My requriement is to fetch a html file from internet .....i am using QHttp in this regard.The site i am accessing requires authentication.
i have written the code and its working fine for singel request.. when multiple request comes into picture i am getting problem because the site i am accessing doesnt allow more than 8 requests..

i am creating new Http object for every request. i also tried using single global object.. but it also authenticates whenever new request i s.. can anyone help ..please

anoop7181
7th September 2010, 15:08
I go the answer .. It not possibel using QHttp in 4.3.....
but its possible Using QNetworkAccessManager which is availabel in later versions of Qt....
correct me if i am wrong

prasad.borkar
17th April 2011, 13:03
Hi,

Can you provide the sample code of QHttp that you have written to connect to
particular site and authenticate using user credentials programatically.
I am working on the same.
Early response awaited.
Thanks in advance.

produktdotestow
17th April 2011, 18:53
Try build your QUrl object with following scheme: QUrl("username:password@host/path") or check out QUrl::setUserName(const QString & userName) and QUrl::setPassword(const QString & password) methods.

anoop7181
18th April 2011, 11:25
Hi Prasad,

Sorry presently i dont have the code with me but i can help you regarding this

So are you trying to authenticate webapage programmatically??
If so have you trie with authentication required slot mechanism!!!



Hi,

Can you provide the sample code of QHttp that you have written to connect to
particular site and authenticate using user credentials programatically.
I am working on the same.
Early response awaited.
Thanks in advance.