http_service
appimage_updater.core.http_service
¶
HTTP service with optional tracing support and connection pooling.
AsyncClient(**kwargs)
¶
GlobalHTTPClientImpl()
¶
TracingAsyncClient(client, tracer=None)
¶
GlobalHTTPClient()
cached
¶
disable_global_trace()
¶
Disable global HTTP tracing.
Source code in src/appimage_updater/core/http_service.py
enable_global_trace(output_formatter=None)
¶
Enable global HTTP tracing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output_formatter
|
Any
|
Output formatter to use for trace messages |
None
|
Source code in src/appimage_updater/core/http_service.py
get_http_client(**kwargs)
¶
Get HTTP client with global tracing configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
HTTP client parameters (timeout, follow_redirects, etc.) |
{}
|
Returns:
Type | Description |
---|---|
Any
|
AsyncClient instance (or mock client for testing) that uses the global client with connection pooling |
Source code in src/appimage_updater/core/http_service.py
reset_http_client_factory()
¶
set_http_client_factory(factory)
¶
Set custom HTTP client factory (mainly for testing).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
factory
|
Callable[..., Any] | None
|
A callable that returns an HTTP client, or None to reset to default |
required |