gleamrpc_http_client
HTTP client for GleamRPC
Call your GleamRPC procedures via HTTP. Should be used with gleamrpc_http_server.
Query data is sent in the request query while the Mutation’s data is sent in the body in Json.
Installation
gleam add gleamrpc_http_client@1
Usage
import gleamrpc
import gleamrpc/http/client.{http_client}
pub fn main() {
use data <- my_procedure
|> gleamrpc.with_client(http_client("http://localhost:3000"))
|> gleamrpc.call(params)
// ...
}
Further documentation can be found at https://hexdocs.pm/gleamrpc_http_client.
Features
- Support for Javascript and Erlang targets
- Send Queries via HTTP Get requests
- Send Mutations via HTTP Post requests
Development
gleam run # Run the project
gleam test # Run the tests