© Shing Lyu 2021
S. LyuPractical Rust Web Projectshttps://doi.org/10.1007/978-1-4842-6589-5_3

3. REST APIs

Shing Lyu1  
(1)
Amsterdam, The Netherlands
 

In the previous chapter, we learned how to build a server-rendered website. However, there are a few drawbacks of using server-side rendering. First, whenever you navigate from one page to another or submit forms, the browser has to request a new page from the server. From the user’s perspective, this means the browser will go blank for a second before the next page appears. With the rise of frontend frameworks like React, Angular, or Vue, this problem can be solved by rendering the page in the frontend with JavaScript. The frontend application makes requests to the server to get information or submit ...

Get Practical Rust Web Projects: Building Cloud and Web-Based Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.