Req.auth

You're seeing just the function auth, go back to Req module for more information.

Sets request authentication.

auth can be one of:

  • {username, password} - uses Basic HTTP authentication

Examples

iex> Req.get!("https://httpbin.org/basic-auth/foo/bar", auth: {"bad", "bad"}).status
401
iex> Req.get!("https://httpbin.org/basic-auth/foo/bar", auth: {"foo", "bar"}).status
200