Get request headers.
(self)
| 46 | self.timeout = timeout |
| 47 | |
| 48 | def _headers(self) -> dict: |
| 49 | """Get request headers.""" |
| 50 | headers = {'Content-Type': 'application/json'} |
| 51 | if self.api_key: |
| 52 | headers['X-API-Key'] = self.api_key |
| 53 | return headers |
| 54 | |
| 55 | def _get(self, path: str, params: dict | None = None) -> dict: |
| 56 | """ |
no outgoing calls