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

Request Options : Adds fix to support injecting/appending custom headers into request via RequestOptions. #2371

Merged
merged 15 commits into from
Apr 22, 2021

Conversation

kr-santosh
Copy link
Contributor

Description

This PR focuses on adding support to inject custom headers into requests via RequestOptions. This would allow customers to directly inject custom headers. (The RequestOptions.Properties is meant for the client context and is not meant for adding headers.)

Type of change

  • [] New feature (non-breaking change which adds functionality)
  • [] This change requires a documentation update

Closing issues

To automatically close an issue: closes #2265

anujtoshniwal
anujtoshniwal previously approved these changes Apr 9, 2021
Copy link
Contributor

@anujtoshniwal anujtoshniwal left a comment

Choose a reason for hiding this comment

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

The PR isn't specific to Client Encryption. Please update the title?

@kr-santosh kr-santosh changed the title Client Encryption : Adds fix to support injecting/appending custom headers into request via RequestOptions. Request Options : Adds fix to support injecting/appending custom headers into request via RequestOptions. Apr 9, 2021
abhijitpai
abhijitpai previously approved these changes Apr 16, 2021
/// Clone RequestOptions.
/// </summary>
/// <returns> cloned RequestOptions. </returns>
public RequestOptions ShallowCopy()
Copy link
Member

Choose a reason for hiding this comment

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

Is it needed as explicit contract?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently required , so that we retain the original user passed RequestOptions ... MemberwiseClone method is protected in the Object class hence exposing ShallowCopy function and to be explicit about it being a shallow copy....

Copy link
Member

Choose a reason for hiding this comment

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

On the name: @j82w are there any guidelines from central SDK team for related such?

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't find any guideline in the central SDK team documentation.

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.

RequestOptions Add Header method
5 participants