ProtoRune.XRPC.Client (proto_rune v0.1.2)
The XRPC.Client module handles executing queries and procedures in the XRPC system. It interacts with external services through HTTP requests and performs response validation and schema parsing. The client supports both GET and POST requests, depending on whether the request is a query or a procedure.
Overview
This module allows:
- Executing Queries: Executes
GETrequests for queries. - Executing Procedures: Executes
POSTrequests for procedures with a body. - Error Handling: Maps various HTTP response codes to custom error messages.
Functions
execute/1
Executes an XRPC query or procedure.
- For queries, it performs a
GETrequest and validates the query parameters. - For procedures, it performs a
POSTrequest and validates the request body.