Jido.Tools.ReqTool behaviour (Jido Action v2.0.0-rc.0)

View Source

A behavior and macro for creating HTTP request tools using the Req library.

Provides a standardized way to create actions that make HTTP requests with configurable URL, method, headers, and JSON parsing options.

Summary

Callbacks

Callback for transforming the HTTP response result.

Functions

Macro for setting up a module as a ReqTool with HTTP request capabilities.

Callbacks

transform_result(map)

(optional)
@callback transform_result(map()) :: {:ok, map()} | {:error, any()}

Callback for transforming the HTTP response result.

Takes a map with request and response data and returns a transformed result.

Functions

__using__(opts)

(macro)
@spec __using__(keyword()) :: Macro.t()

Macro for setting up a module as a ReqTool with HTTP request capabilities.