CompaniesHouse.Client.Req (CompaniesHouse v0.2.0)

View Source

Documentation for CompaniesHouse.Client.Req.

Summary

Functions

Sends a HTTP DELETE request to the given path.

Sends a HTTP GET request to the given path.

Sends a HTTP GET request with parameters to the given path.

Creates a new client for interacting with the Companies House API.

Sends a HTTP POST request to the given path.

Sends a HTTP PUT request to the given path.

Functions

delete(path, client \\ %Client{})

@spec delete(path :: nonempty_binary(), client :: CompaniesHouse.Client.t()) ::
  CompaniesHouse.Response.t()

Sends a HTTP DELETE request to the given path.

get(path, client)

@spec get(path :: nonempty_binary(), client :: CompaniesHouse.Client.t()) ::
  CompaniesHouse.Response.t()

Sends a HTTP GET request to the given path.

get(path, params, client)

@spec get(
  path :: nonempty_binary(),
  params :: keyword(),
  client :: CompaniesHouse.Client.t()
) ::
  CompaniesHouse.Response.t()

Sends a HTTP GET request with parameters to the given path.

new(client \\ %Client{})

@spec new(client :: CompaniesHouse.Client.t()) :: Req.Request.t()

Creates a new client for interacting with the Companies House API.

post(path, params \\ [], client \\ %Client{})

@spec post(
  path :: nonempty_binary(),
  params :: keyword(),
  client :: CompaniesHouse.Client.t()
) ::
  CompaniesHouse.Response.t()

Sends a HTTP POST request to the given path.

put(path, params \\ [], client \\ %Client{})

@spec put(
  path :: nonempty_binary(),
  params :: keyword(),
  client :: CompaniesHouse.Client.t()
) ::
  CompaniesHouse.Response.t()

Sends a HTTP PUT request to the given path.