HTTP Client Settings¶
Examples¶
Here is an example containing all default values for the http_client
application settings.
http_client:
cache:
controller:
allow_heuristics: false
allow_stale: false
cacheable_methods:
- GET
- HEAD
cacheable_status_codes:
- 200
- 203
- 204
- 206
- 300
- 301
- 308
- 404
- 405
- 410
- 414
- 501
type: hishel.Controller
enabled: true
storage:
base: hishel.AsyncBaseStorage
check_ttl_every: 60.0
ttl: null
type: harp_apps.http_client.contrib.hishel.storages.AsyncStorage
transport:
type: hishel.AsyncCacheTransport
proxy_transport:
type: harp_apps.http_client.transport.AsyncFilterableTransport
timeout: 30.0
transport:
retries: 0
type: httpx.AsyncHTTPTransport
verify: true
type: httpx.AsyncClient
Reference¶
Implementation (python): HttpClientSettings
Title |
Description |
Type |
Format |
Required |
---|---|---|---|---|
Base |
Base type for service definition. |
|||
base |
object |
|||
Type |
Type for service definition. |
|||
type |
string |
|||
Default |
httpx.AsyncClient
|
|||
Constructor |
Optional custom constructor for the service. |
|||
constructor |
object |
|||
Arguments |
||||
arguments |
object |
|||
Default |
timeout: 30.0
|
|||
CacheSettings |
||||
cache |
object |
|||
Cache Enabled |
||||
cache/enabled |
boolean |
|||
Default |
true
|
|||
Service |
A settings base class for service definitions. See Service |
|||
cache/transport |
object |
|||
Cache Transport Base |
Base type for service definition. |
|||
cache/transport/base |
object |
|||
Cache Transport Type |
Type for service definition. |
|||
cache/transport/type |
object |
|||
Cache Transport Constructor |
Optional custom constructor for the service. |
|||
cache/transport/constructor |
object |
|||
Cache Transport Arguments |
Arguments for the service constructor. |
|||
cache/transport/arguments |
object |
|||
Cache Transport |
||||
cache/transport/* |
object |
|||
Service |
A settings base class for service definitions. See Service |
|||
cache/controller |
object |
|||
Cache Controller Base |
Base type for service definition. |
|||
cache/controller/base |
object |
|||
Cache Controller Type |
Type for service definition. |
|||
cache/controller/type |
object |
|||
Cache Controller Constructor |
Optional custom constructor for the service. |
|||
cache/controller/constructor |
object |
|||
Cache Controller Arguments |
Arguments for the service constructor. |
|||
cache/controller/arguments |
object |
|||
Cache Controller |
||||
cache/controller/* |
object |
|||
Service |
A settings base class for service definitions. See Service |
|||
cache/storage |
object |
|||
Cache Storage Base |
Base type for service definition. |
|||
cache/storage/base |
object |
|||
Cache Storage Type |
Type for service definition. |
|||
cache/storage/type |
object |
|||
Cache Storage Constructor |
Optional custom constructor for the service. |
|||
cache/storage/constructor |
object |
|||
Cache Storage Arguments |
Arguments for the service constructor. |
|||
cache/storage/arguments |
object |
|||
Cache Storage |
||||
cache/storage/* |
object |
|||
Service |
A settings base class for service definitions. See Service |
|||
transport |
object |
|||
Transport Base |
Base type for service definition. |
|||
transport/base |
object |
|||
Transport Type |
Type for service definition. |
|||
transport/type |
object |
|||
Transport Constructor |
Optional custom constructor for the service. |
|||
transport/constructor |
object |
|||
Transport Arguments |
Arguments for the service constructor. |
|||
transport/arguments |
object |
|||
Transport |
||||
transport/* |
object |
|||
Service |
A settings base class for service definitions. See Service |
|||
proxy_transport |
object |
|||
Proxy Transport Base |
Base type for service definition. |
|||
proxy_transport/base |
object |
|||
Proxy Transport Type |
Type for service definition. |
|||
proxy_transport/type |
object |
|||
Proxy Transport Constructor |
Optional custom constructor for the service. |
|||
proxy_transport/constructor |
object |
|||
Proxy Transport Arguments |
Arguments for the service constructor. |
|||
proxy_transport/arguments |
object |
|||
Proxy Transport |
||||
proxy_transport/* |
object |
|||
* |
object |
.cache¶
Implementation (python): CacheSettings
Title |
Description |
Type |
Format |
Required |
---|---|---|---|---|
Enabled |
||||
enabled |
boolean |
|||
Default |
true
|
|||
Service |
A settings base class for service definitions. See Service |
|||
transport |
object |
|||
Transport Base |
Base type for service definition. |
|||
transport/base |
object |
|||
Transport Type |
Type for service definition. |
|||
transport/type |
object |
|||
Transport Constructor |
Optional custom constructor for the service. |
|||
transport/constructor |
object |
|||
Transport Arguments |
Arguments for the service constructor. |
|||
transport/arguments |
object |
|||
Transport |
||||
transport/* |
object |
|||
Service |
A settings base class for service definitions. See Service |
|||
controller |
object |
|||
Controller Base |
Base type for service definition. |
|||
controller/base |
object |
|||
Controller Type |
Type for service definition. |
|||
controller/type |
object |
|||
Controller Constructor |
Optional custom constructor for the service. |
|||
controller/constructor |
object |
|||
Controller Arguments |
Arguments for the service constructor. |
|||
controller/arguments |
object |
|||
Controller |
||||
controller/* |
object |
|||
Service |
A settings base class for service definitions. See Service |
|||
storage |
object |
|||
Storage Base |
Base type for service definition. |
|||
storage/base |
object |
|||
Storage Type |
Type for service definition. |
|||
storage/type |
object |
|||
Storage Constructor |
Optional custom constructor for the service. |
|||
storage/constructor |
object |
|||
Storage Arguments |
Arguments for the service constructor. |
|||
storage/arguments |
object |
|||
Storage |
||||
storage/* |
object |