-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[Typescript] Add Headers to Request #10406
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
Closed
ksvirkou-hubspot
wants to merge
14
commits into
OpenAPITools:master
from
ksvirkou-hubspot:feature/typescriptAddHeaders
Closed
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
29f1e49
add headers
ksvirkou-hubspot 5f26bd5
add samples
ksvirkou-hubspot 01410ba
update function make request
ksvirkou-hubspot ff5de88
generate samples
ksvirkou-hubspot f0e3247
rename setHeaders to addHeaders
ksvirkou-hubspot bfb51d1
generete samples
ksvirkou-hubspot fe1bcd8
Merge pull request #1 from OpenAPITools/master
ksvirkou-hubspot 1f0c1d7
Merge pull request #3 from OpenAPITools/master
ksvirkou-hubspot 90bb539
Merge pull request #4 from OpenAPITools/master
ksvirkou-hubspot e29ae3d
clone headers for RequestContext
ksvirkou-hubspot cc34f89
regenerate tests
ksvirkou-hubspot 4013b16
Merge pull request #5 from OpenAPITools/master
ksvirkou-hubspot 0b64f3b
Merge pull request #6 from OpenAPITools/master
ksvirkou-hubspot 935fa84
fix abstract class
ksvirkou-hubspot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit: Any thoughts about changing the name?
getHeadersreturn all headers - quite expectedBut
setHeadersdoes not set all headers, instead it's an additive operation merging new headers with existing onesConsequently, it's not possible to remove a header previously added to the server configuration.
I mean - it resembles the existing
setVariablesmethod, true. Not sure if that interface was well thought through, though (e.g.getConfigurationinstead ofgetVariablesindicates otherwise :) )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.
You are right
I think It is better to change the function
@amakhrov
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.
What do you think?
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.
or we can rename it to mergeHeaders or addHeaders
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.
@amakhrov
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.
addHeaders sounds reasonable!
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.
Done
@amakhrov