graph LR
API_Request_Dispatcher["API Request Dispatcher"]
API_Error_Definition["API Error Definition"]
Datetime_Serialization_Utility["Datetime Serialization Utility"]
API_Request_Dispatcher -- "raises" --> API_Error_Definition
API_Request_Dispatcher -- "uses" --> Datetime_Serialization_Utility
This subsystem is responsible for managing and executing HTTP POST requests to the Segment API. It handles the serialization of data, including special handling for datetime objects, applies compression if required, manages HTTP headers (including authorization), and provides robust error handling for API responses by raising a custom APIError for non-200 status codes.
Manages the execution of HTTP POST requests to the Segment API, including data serialization, compression, header management, and robust error handling for API responses.
Related Classes/Methods:
Defines the structure for errors encountered during API interactions, encapsulating the status code, error code, and message received from the Segment API for structured error handling.
Related Classes/Methods:
Provides a specialized JSON encoder for converting Python date and datetime objects into ISO 8601 format, ensuring proper serialization for API requests.
Related Classes/Methods: