View Source ExOciSdk.HTTPClient.Hackney (ex_oci_sdk v0.2.1)
HTTP client implementation using Hackney.
This module implements the ExOciSdk.HTTPClient
behaviour using the Hackney HTTP client.
It handles the translation between Hackney's response format and the expected format
defined in the behaviour.
Summary
Functions
Define the Hackney HTTP client as a dependency for this module
Makes an HTTP request using Hackney.
Functions
@spec deps() :: atom()
Define the Hackney HTTP client as a dependency for this module
@spec request( ExOciSdk.HTTPClient.http_method(), ExOciSdk.HTTPClient.url(), ExOciSdk.HTTPClient.body(), ExOciSdk.HTTPClient.headers(), ExOciSdk.HTTPClient.options() ) :: {:ok, ExOciSdk.HTTPClient.response()} | {:error, ExOciSdk.HTTPClient.error_reason()}
Makes an HTTP request using Hackney.
Implements the ExOciSdk.HTTPClient.request/5
callback using Hackney as the underlying
HTTP client. Converts Hackney's response format to match the expected behaviour format.
Parameters
method
- HTTP method as atom (e.g.,:get
,:post
)url
- Full URL for the request as binarybody
- Request body as iodataheaders
- List of request headers as tuplesoptions
- Additional options for the request