PhoenixApiToolkit.TestHelpers.put_ajax_csrf_header
You're seeing just the function
put_ajax_csrf_header
, go back to PhoenixApiToolkit.TestHelpers module for more information.
Specs
put_ajax_csrf_header(Plug.Conn.t()) :: Plug.Conn.t()
Sets the request header "x-csrf-token", to comply with PhoenixApiToolkit.Security.Plugs.ajax_csrf_protect()
Examples / doctests
iex> conn(:post, "/") |> put_ajax_csrf_header() |> Map.get(:req_headers)
[{"x-csrf-token", "anything"}]