Ejemplo n.º 1
0
    def _initial_entry_data(self, start_time, operation, request,
                            outgoingData):
        """
        Return initial values for a new HAR entry.
        """
        return {
            # custom fields
            '_tmp': {
                'start_time': start_time,
                'request_start_sending_time': start_time,
                'request_sent_time': start_time,
                'response_start_time': start_time,
                # 'outgoingData': outgoingData,
            },
            '_splash_processing_state': self.REQUEST_CREATED,

            # standard fields
            "startedDateTime": format_datetime(start_time),
            "request": request2har(request, operation, outgoingData),
            "response": {
                "bodySize": -1,
            },
            "cache": {},
            "timings": {
                "blocked": -1,
                "dns": -1,
                "connect": -1,
                "ssl": -1,
                "send": 0,
                "wait": 0,
                "receive": 0,
            },
            "time": 0,
        }
Ejemplo n.º 2
0
    def _initial_entry_data(self, start_time, operation, request, content):
        """
        Return initial values for a new HAR entry.
        """
        return {
            # custom fields
            '_tmp': {
                'start_time': start_time,
                'request_start_sending_time': start_time,
                'request_sent_time': start_time,
                'response_start_time': start_time
            },
            '_splash_processing_state': self.REQUEST_CREATED,

            # standard fields
            "startedDateTime": format_datetime(start_time),
            "request": request2har(request, operation, content),
            "response": {
                "bodySize": -1,
            },
            "cache": {},
            "timings": {
                "blocked": -1,
                "dns": -1,
                "connect": -1,
                "ssl": -1,

                "send": 0,
                "wait": 0,
                "receive": 0,
            },
            "time": 0,
        }