You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a REST api. I already had the GET method, but when I added the post method on the same route ("/") it disables the previous defined GET. Same goes if I first define the POST and then the GET method, only the last one define stays.
# this works
curl --header "Content-Type: application/json" \
--request POST \
--data '{ "age": 2}' \
localhost:3000
You cannot access this route.
# this does not
curl -vXGET localhost:3000
Method GET not implemented on route /
Is there any way to make this work?
The text was updated successfully, but these errors were encountered:
I'm trying to create a REST api. I already had the GET method, but when I added the post method on the same route ("/") it disables the previous defined GET. Same goes if I first define the POST and then the GET method, only the last one define stays.
Is there any way to make this work?
The text was updated successfully, but these errors were encountered: