retort v1.3.0 Retort.Client.Request

Metadata about a request that is in-flight for Retort.Client.Generic

Summary

Types

The methods supported by the JSON API over JSON RPC servers

t()

Information needed to send the response from the server by the Elixir process

Functions

Translates the method to the corresponding Alembic.FromJson.action

Converts to Alembic.Meta.t with "action" and "sender" set to work with Alembic.FromJson.from_json/2’s error template

Types

method()
method ::
  :create |
  :create_relationship |
  :destroy |
  :destroy_relationship |
  :get_related_resource |
  :index |
  :show |
  :show_relationship |
  :update |
  :update_relationship

The methods supported by the JSON API over JSON RPC servers

t()
t() :: %Retort.Client.Request{from: {pid, reference}, method: method}

Information needed to send the response from the server by the Elixir process.

  • from the Genserver call identifier to reply to the ELixir client process
  • method - the method of the call. Used to generate Alembic.Meta.t (using to_meta/1) that controls the parsing of the server response.

Functions

method_to_action(method)
method_to_action(method) :: Alembic.FromJson.action

Translates the method to the corresponding Alembic.FromJson.action

to_meta(request)
to_meta(t) :: Alembic.Meta.t

Converts to Alembic.Meta.t with "action" and "sender" set to work with Alembic.FromJson.from_json/2’s error template.

"sender" is always set to :server since parsing responses from this request will by definition come from a server.