Course lesson
Handle Dynamic Requests with Path Parameters in MSW
When mocking a collection of resources in Mock Service Worker, such as our movies, you will encounter requests that have dynamic parts in their URL, like /movies/:slug. In this lesson, learn how to use path parameters to describe dynamic portions of the...
- Duration
- 2 min
- Access
- Included
- Transcript
- Retained from source evidence
When mocking a collection of resources in Mock Service Worker, such as our movies, you will encounter requests that have dynamic parts in their URL, like /movies/:slug. In this lesson, learn how to use path parameters to describe dynamic portions of the request's URL, access those parameters, and return a different response based on their values.