# `Restlax.Client`
[🔗](https://github.com/princemaple/restlax/blob/v1.0.0/lib/restlax/client.ex#L1)

## Rest Client builder

### Options

* `:base_url` - `String.t()` Base URL, e.g. "https://api.cloudflare.com/client/v4"
* `:encoding` - `encoding()` `:json` or `:form_urlencoded`
* `:headers` - `[{String.t(), String.t()}]` Default headers, can be overridden per request
* `:req_options` - `keyword()` Req options that are applied to all requests

### Example

    defmodule MyClient do
      use Restlax.Client,
        base_url: "https://my-awesome.app/api/v1",
        req_options: [receive_timeout: 30_000]
    end

# `encoding`

```elixir
@type encoding() :: :json | :form_url_encoded | :raw
```

# `option`

```elixir
@type option() ::
  {:base_url, String.t()}
  | {:encoding, encoding()}
  | {:headers, [{String.t(), String.t()}]}
  | {:req_options, keyword()}
```

# `request`

```elixir
@spec request(module(), atom(), String.t(), term(), keyword(), boolean()) ::
  {:ok, map()} | map() | no_return()
```

---

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