-
Notifications
You must be signed in to change notification settings - Fork 48
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: adds content type only on post method #198
fix: adds content type only on post method #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! It makes sense to not send this header if there is no body, so I appreciate the effort. However, I'd like to see this tested before we get it in.
In src/index.test.ts
we have two tests that inspect the requests for both get and post cases:
'Should perform an initial fetch as POST'
and 'Should perform an initial fetch as GET'
.
You should be able to inspect the headers of the request here and ensure that the header is present on post requests and that it is not present on get requests.
Does that sound alright? 😄
bfa3f3c
to
08c8753
Compare
Thanks for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this one 🔥 I'll commit the suggestion I put in for the test and get this merged right away. Thanks for the contribution 🙏🏼
Oh, @mohsen-khalili, one more thing: CI is failing because the formatting is inconsistent with prettier. Can you make sure you run prettier on
|
Head branch was pushed to by a user without write access
07a94ad
to
aa6fb8c
Compare
aa6fb8c
to
03a3934
Compare
I fixed it |
No worries at all! I'll merge once the build succeeds. Thanks again |
Released in v3.3.2 |
In sdk for set GET request adds content type in header but not necessary and common waf unit block this request, i change code and set content type header adds only in POST request.
[Closes #197 ]