MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / toDict

Method toDict

lib/utils/har.py:114–134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

112 return "http://%s%s" % (host, self.path)
113
114 def toDict(self):
115 out = {
116 "httpVersion": self.httpVersion,
117 "method": self.method,
118 "url": self.url,
119 "headers": [dict(name=key.capitalize(), value=value) for key, value in self.headers.items()],
120 "cookies": [],
121 "queryString": [],
122 "headersSize": -1,
123 "bodySize": -1,
124 "comment": getText(self.comment),
125 }
126
127 if self.postBody:
128 contentType = self.headers.get("Content-Type")
129 out["postData"] = {
130 "mimeType": contentType,
131 "text": getText(self.postBody).rstrip("\r\n"),
132 }
133
134 return out
135
136class Response(object):
137 extract_status = re.compile(b'\\((\\d{3}) (.*)\\)')

Callers

nothing calls this directly

Calls 4

getTextFunction · 0.90
capitalizeMethod · 0.80
itemsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected