I'm trying to read http request-headers that I can log into the log file (using Qt/c++). I'm able to read the response headers using following simple code:
QList<QByteArray> headerList = pReply->rawHeaderList();
foreach(QByteArray head, headerList)
{
qDebug() << head << ":" << pReply->rawHeader(head);
}
pReply->close();
But so far I had no luck with request headers. While looking for the solution I came across this post: Read complete HTTP request-header; But I didn't really understand how to achieve similar functionality with Qt.
I'm bit lost. How should I go about this?