View Source PhxJsonRpc.Request (Phoenix JSON RPC v0.3.0)

Basic struct for the rpc request.

Link to this section Summary

Types

t()

Type represents structure for the rpc request.

Functions

Creates the new rpc request from the given params.

Link to this section Types

Type represents structure for the rpc request.

Link to this section Functions

@spec new(Keyword.t()) :: t()

Creates the new rpc request from the given params.

examples

Examples

iex> PhxJsonRpc.Request.new(version: "2.0", method: "hello", params: %{"name" => "John"}, id: "[REQUEST-UUID]")
%PhxJsonRpc.Request{
  version: "2.0",
  method: "hello",
  params: %{"name" => "John"},
  id: "[REQUEST-UUID]",
  valid?: nil,
  error: nil
}