Ganesan-Chandran / vscode-fetch-client

Fetch Client is Visual Studio Code extension which is used to test the Rest API.
https://marketplace.visualstudio.com/items?itemName=GanesanChandran.fetch-client
MIT License
15 stars 8 forks source link

POST method not properly set just after creating new Http Request in a collection #8

Closed syracine69 closed 3 months ago

syracine69 commented 1 year ago

Describe the bug Changing the HTTP method to POST just after creating new request in Request form doesn't set it to correct value.

To Reproduce Steps to reproduce the behavior:

  1. Go to Fetch Client extension by clicking the left icon in VSCode
  2. Click on Collection tab
  3. Click on '...' button to the right of the collection name in left panel. Then select in the menu 'New Request'
  4. Enter the name of new request in the top line input. Then type Enter
  5. The new Request is created in the left panel with the HTTP GET method.
  6. In the right panel, change HTTP method dropdown to POST
  7. Type CTRL+S to save the change.
  8. The method in left panel is still 'GET'
  9. Fill the information in the right panel to create de HTTP request
  10. Suppose that you use a backend framework for your API, set the allowed method to POST (e.g. routes files for PHP Laravel Framework)
  11. Send the request with Fetch-client
  12. The response returned an HTTP "405 Error - Method not allowed" showing that GET method was used to send the request
  13. That is the bug

Expected behavior Do not returns an HTTP 405 Error when backend route allows only HTTP POST method.

Screenshots image

Desktop (please complete the following information):

Additional context I show that there are many tabs opened in Fetch-Client extension view with the same HTTP request. Maybe that is the bug I have been installed the Thunder Client extension and it enabled. Hope that there is no conflict with Fetch-content extension

Ganesan-Chandran commented 3 months ago

Hi @syracine69

Thank you for using the Fetch Client extension. This issue is fixed in the latest version Fetch Client v1.5.1

Please update the Fetch Client and let me know if you have any queries/feedback.