View Source CozyAliyunOpenAPI.HTTPClient behaviour (cozy_aliyun_open_api v0.1.0)
The specification for a HTTP client.
It can be set to a client provided by CozyAliyunOpenAPI
, such as:
config :cozy_aliyun_open_api,
http_client: CozyAliyunOpenAPI.HTTPClient.Finch
Or, set it to your own API client, such as:
config :cozy_aliyun_open_api,
http_client: MyHTTPClient
Link to this section Summary
Functions
Issues an HTTP request by the given HTTP client.
Link to this section Types
Link to this section Callbacks
@callback init() :: :ok
Callback to initialize the given API client.
@callback request(CozyAliyunOpenAPI.HTTPRequest.t()) :: response()
Callback to send a request.
Link to this section Functions
@spec request(CozyAliyunOpenAPI.HTTPRequest.t()) :: response()
Issues an HTTP request by the given HTTP client.