AxiomAi.Http (AxiomAI v0.1.11)

View Source

HTTP client utilities for AxiomAI.

Summary

Functions

Performs a GET request.

Performs a POST request with JSON payload.

Performs a POST request with JSON payload and returns a stream for processing chunked responses.

Functions

get(url, headers \\ [], opts \\ [])

@spec get(String.t(), list(), keyword()) :: {:ok, map()} | {:error, any()}

Performs a GET request.

post(url, payload, headers \\ [], opts \\ [])

@spec post(String.t(), map(), list(), keyword()) :: {:ok, map()} | {:error, any()}

Performs a POST request with JSON payload.

post_stream(url, payload, headers \\ [], opts \\ [])

@spec post_stream(String.t(), map(), list(), keyword()) ::
  {:ok, Enumerable.t()} | {:error, any()}

Performs a POST request with JSON payload and returns a stream for processing chunked responses.