1
0
mirror of https://github.com/actix/examples synced 2024-11-30 17:14:35 +01:00
examples/test/status-codes/README.md
2024-01-17 21:06:12 +01:00

856 B

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