hi i am building a desktop application in PyQt python and have a web browser loaded in that , now i want to add functionalities of http fox(Firefox plugin) to view the loaded URLs with the request passed and other headers associated with each URL same as in http fox.
I have written the code from showing the loaded URLs but not finding a way to show the other headers on click of each URL. i have heard about Cookie Jar in Qwebview but do not know how to show with each loaded URL.
My code is:-
class Manager(QNetworkAccessManager):
def __init__(self, table):
QNetworkAccessManager.__init__(self)
self.finished.connect(self._finished)
self.table = table
def _finished(self, reply):
headers = reply.rawHeaderPairs()
headers = {str(k):str(v) for k,v in headers}
content_type = headers.get("Content-Type")
url = reply.url().toString()
status = reply.attribute(QNetworkRequest.HttpStatusCodeAttribute)
status, ok = status.toInt()
self.table.update([url, str(status), content_type])
i want somethinglike-
[![here on the upper part we have loaded URLs and below that we can see the header, i have written the code for loaded URLs but how to show the headers][1]][1]