Mock API
Hello! What can I use for Mock API.
Example:
It is my /server/api/contacts/
export default defineCachedEventHandler(async (_event) => {
const data = await $fetch('https://example.com/contacts');
return {
status: 'success',
data,
};
}, { maxAge: -1 });
How can I return mock data for 'https://example.com/contacts' (It is example url for back API)
0 Replies