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

Better header insertion handling #690

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

rylev
Copy link
Contributor

@rylev rylev commented Mar 17, 2022

Worked on with @yoshuawuyts 🎉

Better handling of how we add headers to requests.

Before

azure_core::headers::add_optional_header2(&self.consistency_level, &mut request)
   .with_context(ErrorKind::DataConversion, || {
      format!(
        "could not encode '{:?}' as an http header",
        self.consistency_level
       )
   })?;

After

request.insert_header(&self.consistency_level)?;

This PR is best reviewed commit by commit.

Copy link
Contributor

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

🎉

@rylev rylev requested a review from cataggar March 17, 2022 15:46
}
request.insert_header(&this.consistency_level)?;
request.insert_header(&this.max_item_count)?;
request.insert_header(&continuation)?;
Copy link
Member

Choose a reason for hiding this comment

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

Wow, what an improvement here!

@yoshuawuyts yoshuawuyts merged commit 102ce3f into Azure:main Mar 18, 2022
@cataggar cataggar added this to the azure_core 0.2.0 milestone Mar 30, 2022
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.

3 participants