CPub.HTTP (CPub v0.3.0) View Source
Wrapper for Tesla.request/2
.
Link to this section Summary
Functions
Performs GET HTTP request.
Performs HEAD HTTP request.
Performs POST HTTP request.
Builds and performs HTTP request.
Link to this section Types
Specs
t() :: CPub.HTTP
Link to this section Functions
Specs
get(CPub.HTTP.Request.url() | nil, CPub.HTTP.Request.headers(), keyword()) :: nil | {:ok, Tesla.Env.t()} | {:error, any()}
Performs GET HTTP request.
Specs
head(CPub.HTTP.Request.url(), CPub.HTTP.Request.headers(), keyword()) :: {:ok, Tesla.Env.t()} | {:error, any()}
Performs HEAD HTTP request.
Specs
post( CPub.HTTP.Request.url(), String.t(), CPub.HTTP.Request.headers(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
Performs POST HTTP request.
Specs
request( Tesla.Client.t(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
Specs
request( CPub.HTTP.Request.method(), CPub.HTTP.Request.url(), String.t(), CPub.HTTP.Request.headers(), keyword() ) :: {:ok, Tesla.Env.t()} | {:error, any()}
Builds and performs HTTP request.