Rishabh Bansal
Rishabh Bansal

Reputation: 61

QHttpResponseHeader is obsolete and removed from Qt5

In my project, I used QHttpResponseHeader in Qt4.8.6, but it became obsolete and it is not available anymore in Qt5. What is its equivalent class in Qt5?

Upvotes: 1

Views: 876

Answers (1)

IAmInPLS
IAmInPLS

Reputation: 4125

There is an equivalent already available in Qt4.8 : look at the QNetworkReply class, particularly the header() and rawHeader() functions. It should be what you are looking for.

A bit of explanation : QNetworkAccessManager is the class which allows you to send and receive requests. It is much more flexible and not limited to a single protocol, in contrast to QHttp/QFtp. Before, you had to decide on the application level which protocol to use, and now you only pass an URL to the QNetworkAccessManager, it will manage the rest.

Upvotes: 1

Related Questions