I use a object of QNetworkAccessManager
to post json data to a website.
when handle the reply which is a pointer of QNetworkReply
class in the slot function, the value of reply->error()
is 301
and the value of reply->errorString()
is Error downloading http://www.example.com/query - server replied: Service Unavailable
.
I check the documentation of QNetworkReply
, the description of this error is:
QNetworkReply::ProtocolUnknownError|301|the Network Access API cannot honor the request because the protocol is not known
and I also known this error is different form the http status 301.
and I have add http://
before the url.
Can someone give some info about this?