mirror of
https://github.com/actix/examples
synced 2024-11-30 17:14:35 +01:00
856 B
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:
- Test for the exact status code (defined here)
- Test for the status code classes
informational
,success
,redirect
,client_error
andserver_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