-
Notifications
You must be signed in to change notification settings - Fork 108
Route paths with variables
Lazarus Lazaridis edited this page Nov 17, 2017
·
1 revision
When creating a mock, you can specify a template path including variables.
For example, if you set your path to:
/people/:person_id/books/:book_title
then requests like
/people/1/books/sapiens
will be being served by this mock.
Especially if you are defining a dynamic mock, the path variables person_id
and book_title
will be available to you in the script as parameters (see creating a dynamic mock with Embedded Ruby or creating a dynamic mock with Javascript).
- DuckRails - 2017 Wiki pages.
- Feel free to request for documentation that you believe is missing by opening issues with the label
wiki