Lather.Client (lather v1.0.42)

View Source

Main SOAP client interface.

This module provides the primary API for making SOAP requests.

Summary

Functions

Makes a SOAP request to the specified operation.

Creates a new SOAP client for the given endpoint.

Types

t()

@type t() :: %Lather.Client{endpoint: String.t(), options: keyword()}

Functions

call(client, operation, params, options \\ [])

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

Makes a SOAP request to the specified operation.

Parameters

  • client - The SOAP client
  • operation - The SOAP operation name (atom or string)
  • params - Parameters for the operation
  • options - Request-specific options

Examples

iex> _client = Lather.Client.new("https://example.com/soap")
iex> # This would make an actual HTTP request:
iex> # Lather.Client.call(client, :get_user, %{id: 123})

new(endpoint, options \\ [])

@spec new(
  String.t(),
  keyword()
) :: t()

Creates a new SOAP client for the given endpoint.

Options

  • :timeout - Request timeout in milliseconds (default: 30_000)
  • :headers - Additional HTTP headers to include with requests
  • :ssl - SSL options for HTTPS connections

Examples

iex> _client = Lather.Client.new("https://example.com/soap")
%Lather.Client{endpoint: "https://example.com/soap", options: []}