vscode-live-server: Status Code: 405 Method Not Allowed

I’m submitting a…

[ ] 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: -->

Current behavior

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”.

Expected behavior

I would expect Live Server to not serve back a 405 error 😃

Environment

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

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 2
  • Comments: 27

Most upvoted comments

Same issue. Just stopped using Live Server in VS Code.

Same issue. Wow, this is old.

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.