405 Error for POST request
I'm working through a Coding Train tutorial on data and APIs, but I got to a point where I keep getting a 405 error when trying to make a POST request.
index.js:
script inside index.html:
In the console I get:
If I go to Network in the dev tools in Chrome and open the item with the error I can see that the Response Headers > Allow: GET, HEAD, OPTIONS.
I'm not sure why POST is not allowed.
Any help would be greatly appreciated. Thanks!
index.js:
script inside index.html:
In the console I get:
geolocation available[my lat] [my lng]POST http... net::ERR_ABORTED 405 (Method Not Allowed)If I go to Network in the dev tools in Chrome and open the item with the error I can see that the Response Headers > Allow: GET, HEAD, OPTIONS.
I'm not sure why POST is not allowed.
Any help would be greatly appreciated. Thanks!
