mirror of
https://github.com/actix/examples
synced 2024-11-27 16:02:57 +01:00
.. | ||
src | ||
Cargo.toml | ||
README.md |
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