View Source Faker.Internet.StatusCode (Faker v0.18.0)

Functions for generating HTTP status codes

Summary

Functions

Returns a client error status code

Returns an information status code

Returns a redirect status code

Returns a server error status code

Returns a success status code

Functions

@spec client_error() :: 400..418 | 421..426 | 428..429 | 431 | 451

Returns a client error status code

Examples

iex> Faker.Internet.StatusCode.client_error()
428
iex> Faker.Internet.StatusCode.client_error()
405
iex> Faker.Internet.StatusCode.client_error()
424
iex> Faker.Internet.StatusCode.client_error()
424
@spec information() :: 100..103

Returns an information status code

Examples

iex> Faker.Internet.StatusCode.information()
102
iex> Faker.Internet.StatusCode.information()
101
iex> Faker.Internet.StatusCode.information()
103
iex> Faker.Internet.StatusCode.information()
100
@spec redirect() :: 300..308

Returns a redirect status code

Examples

iex> Faker.Internet.StatusCode.redirect()
303
iex> Faker.Internet.StatusCode.redirect()
302
iex> Faker.Internet.StatusCode.redirect()
306
iex> Faker.Internet.StatusCode.redirect()
305
@spec server_error() :: 500..508 | 510..511

Returns a server error status code

Examples

iex> Faker.Internet.StatusCode.server_error()
503
iex> Faker.Internet.StatusCode.server_error()
506
iex> Faker.Internet.StatusCode.server_error()
506
iex> Faker.Internet.StatusCode.server_error()
506
@spec success() :: 200..208 | 226

Returns a success status code

Examples

iex> Faker.Internet.StatusCode.success()
200
iex> Faker.Internet.StatusCode.success()
201
iex> Faker.Internet.StatusCode.success()
205
iex> Faker.Internet.StatusCode.success()
204