-
Notifications
You must be signed in to change notification settings - Fork 18
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
Added support for overriding various fields of outgoing requests #224
Merged
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #224 +/- ##
============================================
+ Coverage 79.64% 80.46% +0.81%
- Complexity 209 281 +72
============================================
Files 29 29
Lines 732 824 +92
Branches 75 79 +4
============================================
+ Hits 583 663 +80
- Misses 111 119 +8
- Partials 38 42 +4 ☔ View full report in Codecov by Sentry. |
atejada
approved these changes
Apr 28, 2024
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.
Looks good 👍
Merged
mrashed-dev
added a commit
that referenced
this pull request
Apr 30, 2024
# Changelog ### Added * Added missing webhook triggers (#220) * Added provider field to token exchange response (#225) * Added support for clean messages endpoint (#226, #228) * Added support for custom headers field for Drafts and Messages (#223) * Added support for overriding various fields of outgoing requests (#224) ### Changed * Fixed issue where attachments < 3mb were not being encoded correctly (#227, #222) # License <!-- Your PR comment must contain the following line for us to merge the PR. --> I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR adds support for adding a new
RequestOverride
object which can be built with fields that can override:for outgoing requests.
Usage
For all methods that call the Nylas API, there is now an additional
overrides: RequestOverrides?
field that takes in the built object and will override the specific outgoing call with whatever non-null values are present. This can also be used to add additional headers to outgoing calls. Here's an example:License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.