Object-Oriented Programming · Tesla · Medium
Below is a requests-based client. It separates transport errors, unsuccessful HTTP statuses, retryable 429 responses, and invalid JSON bodies. Assumptions The caller supplies the HTTP method, path, payload, and headers; no service-specific fields are hard-coded. A successful response is an HTTP 2xx response with a JSON body, except 204 No Content, which is treated as success with data=None. Retrying is safe only when the operation is idempotent or the caller provides an…
Checking your access…