Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Content-Type header added despite no request body defined in POST/PUT/PATCH endpoints #2739

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nikrooz
Copy link

@nikrooz nikrooz commented Nov 22, 2024

Addressed

#2734

Changes

If no request body is defined, the Content-Type header should not be included.

Screenshot

Screenshot 2024-11-22 at 12 41 54

Elements Default PR Template

In general, make sure you have: (check the boxes to acknowledge you've followed this template)

Other Available PR Templates:

Copy link

netlify bot commented Nov 22, 2024

Deploy Preview for stoplight-elements-demo ready!

Name Link
🔨 Latest commit 3e326e7
🔍 Latest deploy log https://app.netlify.com/sites/stoplight-elements-demo/deploys/6770245b2c5c3e0008a6322f
😎 Deploy Preview https://deploy-preview-2739--stoplight-elements-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 22, 2024

Deploy Preview for stoplight-elements ready!

Name Link
🔨 Latest commit 3e326e7
🔍 Latest deploy log https://app.netlify.com/sites/stoplight-elements/deploys/6770245b9148760008dae4a2
😎 Deploy Preview https://deploy-preview-2739--stoplight-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nikrooz nikrooz force-pushed the NN_remove-content-type-when-no-request-body branch from ddc6051 to 00b8544 Compare November 27, 2024 10:14
@nikrooz
Copy link
Author

nikrooz commented Nov 27, 2024

I would greatly appreciate it if someone could review this. Thank you!
CC @mnaumanali94

@darekplawecki
Copy link
Contributor

@nikrooz The code looks good, but if you want for these changes to be released after merging, you have to bump up versions in the proper package.json files. Please make sure to read our Versioning Gudelines.

cc. @mnaumanali94

@nikrooz nikrooz force-pushed the NN_remove-content-type-when-no-request-body branch 3 times, most recently from 24bbe18 to 74358ed Compare December 9, 2024 11:34
@nikrooz
Copy link
Author

nikrooz commented Dec 9, 2024

@darekplawecki Thank you for your comments. I've updated the version; please let me know if there's anything else

On a different note, the e2e-react-cra is failing on the main branch due to type conflicts introduced by the release of React 19. I resolved this issue in my PR by adding a resolution for @types/react to the react-cra example.

Update: since the fix landed in main #2750, I removed my fix commit in this PR

@nikrooz nikrooz force-pushed the NN_remove-content-type-when-no-request-body branch from 74358ed to c99eeb6 Compare December 12, 2024 18:10
@nikrooz
Copy link
Author

nikrooz commented Dec 19, 2024

Hi team, any chance we can review this and get it merged. Thanks!

@nikrooz nikrooz force-pushed the NN_remove-content-type-when-no-request-body branch from 1b5218a to 3e326e7 Compare December 28, 2024 16:16
@nikrooz
Copy link
Author

nikrooz commented Jan 7, 2025

@darekplawecki Could you please take another look at this? I would greatly appreciate it, as our upcoming release is currently blocked by this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants