-
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
In HTTP requests, DELETE and PUT methods often do not require a Content-Type header, especially when no request body is being sent. Currently, the fetchff plugin automatically adds the Content-Type header for all request methods, including DELETE and PUT, even when it's unnecessary.
This issue aims to enhance the library by:
- Removing the Content-Type header from DELETE and PUT requests by default, unless a request body is explicitly provided by the user.
- Ensuring that this behavior is consistent across all instances of fetchff.
- Providing the ability for users to override the behavior by manually setting a Content-Type if needed.
Motivation:
- Simplifies the HTTP requests where no content is required, making them cleaner and more aligned with HTTP specifications.
- Reduces potential confusion for users who may expect no Content-Type for these methods.
- Ensures better interoperability with certain APIs that may reject DELETE or PUT requests with an unnecessary Content-Type.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers