Skip to content

Commit

Permalink
prototyping HAR functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fleenor committed Aug 23, 2010
1 parent 476b817 commit 5abd10b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions har.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'''
Parses a list of HTTPFlows into data suitable for writing to a HAR file.
'''

class Page:
def __init__(self, title, startedDateTime):
self.title = title
self.startedDateTime = startedDateTime

class Entry:
def __init__(self, request, response):
self.request = request
self.response = response
self.total_time = (response.end_time - request.start_time) + startup_time

def extract_data(httpdata):
'''
Extracts http data from the httpdata and converts it into a python dict
suitable for writing straight out as a HAR.
Args:
httpflows = [http.MessagePair]
Returns:
{} = HAR data
'''

0 comments on commit 5abd10b

Please sign in to comment.