AxiomAi.Http (AxiomAI v0.1.4)

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 \\ [])

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

Performs a GET request.

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

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

Performs a POST request with JSON payload.

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

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

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