# `Lather.Http.Transport`
[🔗](https://github.com/awksedgreep/lather/blob/v1.0.49/lib/lather/http/transport.ex#L1)

HTTP transport layer for SOAP requests.

Handles HTTP/HTTPS communication using Finch for connection pooling
and efficient request handling.

# `build_headers`

```elixir
@spec build_headers(keyword()) :: [{String.t(), String.t()}]
```

Builds HTTP headers for SOAP requests.

## Parameters

* `options` - Request options including SOAP version and action

## Options

* `:soap_version` - SOAP protocol version (`:v1_1` or `:v1_2`, default: `:v1_1`)
* `:soap_action` - SOAPAction header value or action to embed in Content-Type
* `:headers` - Additional custom headers
* `:basic_auth` - Basic authentication credentials

# `post`

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

Sends a POST request with the SOAP envelope to the specified endpoint.

## Parameters

* `url` - The SOAP endpoint URL
* `body` - The SOAP envelope XML as a string
* `options` - Request options

## Options

* `:timeout` - Request timeout in milliseconds
* `:headers` - Additional headers to include
* `:soap_action` - SOAPAction header value
* `:soap_version` - SOAP protocol version (`:v1_1` or `:v1_2`, default: `:v1_1`)
* `:ssl_options` - SSL/TLS options for HTTPS connections
* `:pool_timeout` - Connection pool timeout in milliseconds
* `:basic_auth` - Basic authentication credentials `{username, password}`

## Examples

    # Example usage (would make actual HTTP request):
    # Transport.post("https://example.com/soap", "<soap>...</soap>", [])
    # {:ok, %{status: 200, body: "<response>...</response>"}}

    # With Basic authentication:
    # Transport.post(url, body, basic_auth: {"user", "pass"})

# `ssl_options`

```elixir
@spec ssl_options(keyword()) :: keyword()
```

Creates SSL options for secure SOAP connections.

## Parameters

* `options` - SSL configuration options

## Options

* `:verify` - Verification mode (:verify_peer or :verify_none)
* `:cacerts` - List of CA certificates
* `:cert` - Client certificate
* `:key` - Client private key
* `:versions` - Supported TLS versions

# `validate_url`

```elixir
@spec validate_url(String.t()) :: :ok | {:error, :invalid_url}
```

Validates a URL for SOAP requests.

## Examples

    iex> Lather.Http.Transport.validate_url("https://example.com/soap")
    :ok

    iex> Lather.Http.Transport.validate_url("invalid-url")
    {:error, :invalid_url}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
