Summary
In this chapter, we created a microservice using a hyper crate. We started with a minimal example that only responds with the Rust Microservice message. Then, we created a microservice that has two distinct paths – the first being the index page request and the second, the NOT_FOUND response.
Once we learned the basics, we then started to use the match expression to make the microservice REST-compliant. We also added the ability to handle users' data with four basic operations—create, read, update, and delete.
To expand the routing capabilities in the last example of the chapter, we implemented routing based on regular expressions. Regular expressions are compact patterns that check and extract data from a text.
In this chapter, we ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access