1
0
mirror of https://github.com/actix/examples synced 2025-02-21 17:02:47 +01:00
examples/test/status-codes

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