-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
feature requestNew feature to be addedNew feature to be addedgood first issueGood for newcomersGood for newcomers
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
fastify.route({
method: "get",
url: `/`,
handler: getAllItem
});
should work similar to Axios
Motivation
I was creating a mock server for my front-end. I have API calls listed in axios in front-end. I wanted to reuse those params in fastify to create the mock server.
Example
export const getAccountInfo = async () => {
try {
const res = await apiClient({
method: "get",
url: `/v1/profile`,
});
if (res.status === 200) return res;
} catch (error) {
return error.response;
}
};
I could reuse the options in both axios and fastify if fastify accepts lower case of method.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestNew feature to be addedNew feature to be addedgood first issueGood for newcomersGood for newcomers