# `Req.CSV`
[🔗](https://github.com/wojtekmach/req/blob/v0.8.0-rc.0/lib/req/csv.ex#L1)

CSV decoding using [nimble_csv].

`Req.Decode` can use this module for `.csv` and `text/csv` responses when the `:csv`
decoder is enabled via the `:decoders` option.

[nimble_csv]: https://hex.pm/packages/nimble_csv

## Examples

    Req.get!(url, decoders: [:csv]).body
    #=> [["x", "y"], ["1", "2"], ["3", "4"]]

`Req.CSV` does NOT currently do streaming decoding:

    Req.stream(
      url,
      nil,
      fn data, _resp, acc ->
        IO.inspect(data)
        {:cont, acc}
      end,
      decoders: [:csv]
    )
    # Output: "x,y\r\n"
    # Output: "1,2\r\n"
    # Output: "3,4\r\n"

---

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