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

Method toDict

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

Source from the content-addressed store, hash-verified

70 self.extendedArguments = extendedArguments
71
72 def toDict(self):
73 out = {
74 "request": self.request.toDict(),
75 "response": self.response.toDict(),
76 "cache": {},
77 "timings": {
78 "send": -1,
79 "wait": -1,
80 "receive": -1,
81 },
82 "time": int(1000 * (self.endTime - self.startTime)),
83 "startedDateTime": "%s%s" % (datetime.datetime.fromtimestamp(self.startTime).isoformat(), time.strftime("%z")) if self.startTime else None
84 }
85 out.update(self.extendedArguments)
86 return out
87
88class Request(object):
89 def __init__(self, method, path, httpVersion, headers, postBody=None, raw=None, comment=None):

Callers 1

obtainMethod · 0.45

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected