HTTP
Request lab
An HTTP client for the Harbour Market API, like Postman or curl. Pick a preset or write your own request: the raw request on the left, the raw response in the middle, and the same request as fetch() and curl on the right. The server runs in this page (the same code as project/server/) and keeps its data until you restart it.
Try this
- Send POST a review twice, then reviews. Which status did the POST answer, and which header tells you the new review's URL?
- rating as a string, no Content-Type, body: [object Object]: three broken requests, three different status codes. Which mistake in your JavaScript produces each one?
- Send PUT /api/saved/:id three times, then
GET /api/saved. How many times is mezcal in the list? That's what idempotent means.
- page 2 of 3: find the header that tells a client where page 3 is, and the one with the total.
- PATCH Mezcal Moon without a token, with a made-up one, with Taco Bike's vendor token and with the admin token: 401, 401, 403, 200. What's the difference between the two "no"s? Restart the server: what's Mezcal Moon back to?
The API is documented in api.html.