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

Basic struct for the rpc request.

Summary

Types

t()

Type represents structure for the rpc request.

Functions

Creates the new rpc request from the given params.

Types

Type represents structure for the rpc request.

Functions

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

Creates the new rpc request from the given params.

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
}