HTTP transport for A2A. Client-side implementation of
A2aEngine.Transport; pairs with A2aEngine.Transport.Http.Plug on the
server side.
Uses Req for unary requests and for SSE streaming.
target
A URL string (e.g. "https://agent.example/a2a"). The A2A
JSON-RPC envelope is POSTed to this URL.
opts
:headers— extra headers to include (e.g.Authorization).:timeout— request timeout in ms (default 30 000 for unary, 60 000 for streams).:req_opts— any additional options to pass through toReq.
Streaming
stream_request/3 returns {:ok, stream} where stream is a lazy
Enumerable producing decoded SSE event payloads (maps). The
underlying Req task runs in a linked process; closing the stream early
stops the task.