1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00
examples/test/status-codes
2024-01-17 21:06:12 +01:00
..
src feat(test): add test for status codes 2024-01-17 21:06:12 +01:00
Cargo.toml feat(test): add test for status codes 2024-01-17 21:06:12 +01:00
README.md feat(test): add test for status codes 2024-01-17 21:06:12 +01:00

Status Code

The StatusCode trait contains the methods to test for the status codes. There are mainly two ways to test for the returning status code:

  1. Test for the exact status code (defined here)
  2. Test for the status code classes informational, success, redirect, client_error and server_error (defined here)

You can find the list of status codes definitions and their constants here.

RFC 7231 docs.

server

cd test/status-codes
cargo test