Skip to content

fix: Utilize headers set on the Request object - #657

Merged
eshanholtz merged 2 commits into
sendgrid:mainfrom
prputnam:fix-use-request-headers
Dec 4, 2020
Merged

fix: Utilize headers set on the Request object#657
eshanholtz merged 2 commits into
sendgrid:mainfrom
prputnam:fix-use-request-headers

Conversation

@prputnam

@prputnam prputnam commented Dec 3, 2020

Copy link
Copy Markdown
Contributor

Fixes #214

This PR makes it so headers set on a Request object are utilized in final request sent to the SendGrid API. Currently, only the header values set on the SendGrid object itself are utilized.

I also swapped the for each out for putAll - certainly not married to that change if it is unwarranted.

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Dec 3, 2020
@prputnam
prputnam force-pushed the fix-use-request-headers branch from d080ec0 to 4eaa0c4 Compare December 3, 2020 18:41
@prputnam

prputnam commented Dec 3, 2020

Copy link
Copy Markdown
Contributor Author

Looks like the CI failure occurred when attempting to grab an artifact. I'm going to close and re-open this PR with the hope it triggers another CI run.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project sendgrid-java: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven.surefire:surefire-api:jar:2.12.4, org.apache.maven.surefire:maven-surefire-common:jar:2.12.4, org.apache.commons:commons-lang3:jar:3.1: Could not transfer artifact org.apache.maven.surefire:surefire-api:jar:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Connection reset -> [Help 1]

@prputnam prputnam closed this Dec 3, 2020
@prputnam prputnam reopened this Dec 3, 2020

@eshanholtz eshanholtz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the contribution!

@eshanholtz
eshanholtz merged commit d34ee53 into sendgrid:main Dec 4, 2020
@prputnam

prputnam commented Dec 4, 2020

Copy link
Copy Markdown
Contributor Author

Thanks for the merge! Is there a regular release cadence for this library?

@eshanholtz

Copy link
Copy Markdown
Contributor

Yup! We release bi-weekly, next one's scheduled for 2020-12-16.

@prputnam
prputnam deleted the fix-use-request-headers branch December 8, 2020 21:38
@prputnam

prputnam commented Dec 8, 2020

Copy link
Copy Markdown
Contributor Author

Okay, great! Thanks @eshanholtz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: code review request requesting a community code review or review from Twilio

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request to create API key for subuser is not working as expected. Additional SendGrid request headers aren't being passed with the request.

3 participants