[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->
This is a duplicate of Issues #54 and #66, but they have been closed. I have tried the suggestions in Issue #54, but they did not work for me (i.e. running on a different port and killing any task running on port 5500).
I have a simple HTML form with method="post". When the form is submitted, Live Server returns a 405 Method Not Allowed. Looking in the browser Developer Tools, the Response header has "Allow: GET, HEAD, OPTIONS".
I would expect Live Server to not serve back a 405 error :)
Windows 7 Home, 64-bit
Browser:
- [x] Chrome (desktop) version 76.0.3809.100 (64-bit)
- [x] Firefox version 68.0.1 (64-bit)
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Live Server: 5.6.1
- Platform: Windows
- Visual Studio Code: 1.36.1
mark this issue
we are having the same issue, we need help to solve this.
Same issue here too.
Same here
I managed to figure out what it was on my end. I was trying to get a package running (in particular, JQuery File Manager) and the package was trying to use Node.JS server calls to get the files on my server. Since it was only running through Live Server and not an actual Node server, it freaked out and this error was brought up. My fix was to actually transform my project into a real Node server.
I managed to figure out what it was on my end. I was trying to get a package running (in particular, JQuery File Manager) and the package was trying to use Node.JS server calls to get the files on my server. Since it was only running through Live Server and not an actual Node server, it freaked out and this error was brought up. My fix was to actually transform my project into a real Node server.
yow correct me if I am wrong, so you stop using the vs code live server?
I managed to figure out what it was on my end. I was trying to get a package running (in particular, JQuery File Manager) and the package was trying to use Node.JS server calls to get the files on my server. Since it was only running through Live Server and not an actual Node server, it freaked out and this error was brought up. My fix was to actually transform my project into a real Node server.
yow correct me if I am wrong, so you stop using the vs code live server?
Yea, I stopped using LiveServer in favor of using Node.
Same issue.
Request URL: http://127.0.0.1:5500/
Request Method: POST
Status Code: 405 Method Not Allowed
Remote Address: 127.0.0.1:5500
I think my issue is/was the same too.
described here
https://stackoverflow.com/questions/59024415/405-method-not-allowed-error-returned-upon-post-request-in-node-js-and-express/59027595#59027595
I found the same issue:
$.ajax('data/addToCart.json', {
type: 'POST',
dataType: 'json',
contentType: 'application/json'
})
Once I switch from Live Server to NodeJS's node-http-server the issue was no longer happening.
Same issue. Just stopped using Live Server in VS Code.
I just had the same issue.
https://stackoverflow.com/questions/60010357/405-method-not-allowed-in-simple-html-form-php-code
I just had the same issue.
https://stackoverflow.com/questions/60010357/405-method-not-allowed-in-simple-html-form-php-code
Dropping live server extension seems to solve it for most.
This is still an issue...
This is still an issue:
Here is my code:
const params = {
id: 123,
pepe: cuadrado,
torre: 123456789
}
fetch(url, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify(params)
});
and html:
Most helpful comment
Same issue. Just stopped using Live Server in VS Code.