wxc_sdk.har_writer.har package
HAR file format models, based on the HAR 1.2 spec, http://www.softwareishard.com/blog/har-12-spec/
- class wxc_sdk.har_writer.har.HAR(*, log: HARLog, **extra_data: Any)[source]
Bases:
HARModelThe HAR file format is a JSON format that stands for HTTP Archive.
- class wxc_sdk.har_writer.har.HARLog(*, version: str, creator: HARCreator, entries: list[HAREntry] | None = None, **extra_data: Any)[source]
Bases:
HARModel- version: str
- creator: HARCreator
- class wxc_sdk.har_writer.har.HAREntry(*, request: ~wxc_sdk.har_writer.har.HARRequest, response: ~wxc_sdk.har_writer.har.HARResponse, cache: ~typing.Annotated[dict[str, str], ~pydantic.functional_validators.BeforeValidator(func=~wxc_sdk.har_writer.har.NameValue.list_to_dict, json_schema_input_type=PydanticUndefined), ~pydantic.functional_validators.PlainValidator(func=~wxc_sdk.har_writer.har.NameValue.plain_to_dict, json_schema_input_type=~typing.Any), ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.har_writer.har.NameValue.dict_to_list, return_type=PydanticUndefined, when_used=always)] | None = None, startedDateTime: ~typing.Annotated[~pydantic.types.AwareDatetime, ~pydantic.functional_validators.AfterValidator(func=~wxc_sdk.har_writer.har.tz_is_utc), ~pydantic.functional_serializers.PlainSerializer(func=~wxc_sdk.har_writer.har.<lambda>, return_type=str, when_used=always)] = None, time: float, timings: ~wxc_sdk.har_writer.har.HARTimings = None, **extra_data: ~typing.Any)[source]
Bases:
HARModel- request: HARRequest
- response: HARResponse
- cache: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)] | None
- startedDateTime: <lambda>, return_type=str, when_used=always)]
- time: float
- timings: HARTimings
- class wxc_sdk.har_writer.har.HARRequest(*, method: str, url: str, httpVersion: str, cookies: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)] = None, headers: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)], queryString: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)] | None = None, postData: str | PostData | Any | None = None, headersSize: int = -1, bodySize: int = -1, with_authorization: bool = False, **extra_data: Any)[source]
Bases:
HARModelRequest data in a HAR file entry
- method: str
- url: str
- httpVersion: str
- cookies: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)]
- headers: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)]
- queryString: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)] | None
- postData: str | PostData | Any | None
- headersSize: int
- bodySize: int
- with_authorization: bool
- class wxc_sdk.har_writer.har.HARResponse(*, status: int, statusText: str, httpVersion: str, cookies: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)] | None = {}, headers: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)], content: HARContent | None = None, redirectURL: str | None = '', headersSize: int | None = -1, bodySize: int | None = -1, content_str: str | None = None, **extra_data: Any)[source]
Bases:
HARModelResponse data in a HAR file entry
- status: int
- statusText: str
- httpVersion: str
- cookies: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)] | None
- headers: Annotated[dict[str, str], BeforeValidator(func=list_to_dict, json_schema_input_type=PydanticUndefined), PlainValidator(func=plain_to_dict, json_schema_input_type=Any), PlainSerializer(func=dict_to_list, return_type=PydanticUndefined, when_used=always)]
- content: HARContent | None
- redirectURL: str | None
- headersSize: int | None
- bodySize: int | None
- content_str: str | None
content as string. Not part of the HAR spec, but derived from content and can be used to set content
- property json_data: dict | None
JSON content if available