GET /books/:id
This returns 1 book, the book which id corresponds to the parameter entered
Endpoint URL
http://127.0.0.1:8080/api/books/:idPath parameters
Name
Type
Description
Example code
const loadBook = async (id) => {
try {
const response = await fetch(`http://127.0.0.1:8080/api/books/${id}`);
const book = response.json();
return book
} catch (error) {
console.error("Error fetching book data:", error);
throw error;
}
} Example response
Response fields
Name
Type
Description
Last updated