In this chapter we are going to create an endpoint to receive POST request and read Authorization Header with Axum TypedHeaders
Â
Create a new project and install dependencies
Â
Using the same axum_api project from chapter 1, We need to compare user and password hardcoded to implement http post request. First add the next route to your route.rs
We can create an struct to show custom responses
Now in api_handler.rs we need to create the function login to handle http post request.