[Qt-interest] QHttp howto get response code ? e.g 200 , 404
Markus
madmax1701 at googlemail.com
Sun Mar 14 12:05:05 CET 2010
Aaron Lewis schrieb:
> Hi,
> I have a QHttp class , and after it sends data to server , i'd like
> to know the Http Response Code
> e.g 200 means page exists , 404 means it doesn't exist.
>
> -snip-
> QHttp req;
> if(method.toLatin1() == "GET")
> {
> req.get(url);
> }else if(method.toLatin1() == "POST"){
> req.post(url,"");
> }
> // int responseNumber ... get Http response Code
> // switch responseNumber { .. } .. Check Http response Code
>
> -snip-
>
> Any ideas will appreciate ;-)
>
Take a look at the tutorial from James Marshall. It was a good
introdution for me.
http://jmarshall.com/easy/http/
And for the http status codes:
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
More information about the Qt-interest-old
mailing list