Skip to content

feat: add WriteWithInterceptor example#227

Merged
NguyenHoangSon96 merged 5 commits intomainfrom
feat/add-interceptor-example
Apr 1, 2026
Merged

feat: add WriteWithInterceptor example#227
NguyenHoangSon96 merged 5 commits intomainfrom
feat/add-interceptor-example

Conversation

@NguyenHoangSon96
Copy link
Copy Markdown
Contributor

@NguyenHoangSon96 NguyenHoangSon96 commented Feb 26, 2026

Closes #

Proposed Changes

  • Add example for write data with interceptor

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

Copy link
Copy Markdown
Contributor

@alespour alespour left a comment

Choose a reason for hiding this comment

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

The title should be "feat: add WriteWithInterceptor example", I assume.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new C# example demonstrating how to write data using a custom HttpClient interceptor/handler, and wires it into the General examples runner.

Changes:

  • Add WriteWithInterceptor example with a DelegatingHandler that modifies request headers
  • Register the new example in Examples/General/Runner.cs
  • Document the example addition in CHANGELOG.md

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
Examples/General/WriteWithInterceptor.cs New write example using a custom HttpClient handler/interceptor
Examples/General/Runner.cs Adds a runner entry to execute the new example
CHANGELOG.md Adds a feature note for the new example

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Examples/General/WriteWithInterceptor.cs
Comment thread Examples/General/WriteWithInterceptor.cs Outdated
Comment thread CHANGELOG.md
Comment thread Examples/General/WriteWithInterceptor.cs
Comment thread Examples/General/WriteWithInterceptor.cs Outdated
bednar
bednar previously approved these changes Mar 17, 2026
@bednar bednar dismissed their stale review March 17, 2026 05:44

Old one

@NguyenHoangSon96 NguyenHoangSon96 changed the title feat: add QueryWithInterceptor example feat: add WriteWithInterceptor example Mar 20, 2026
@NguyenHoangSon96 NguyenHoangSon96 force-pushed the feat/add-interceptor-example branch from 728c59a to e0c7023 Compare March 31, 2026 10:45
@alespour
Copy link
Copy Markdown
Contributor

alespour commented Mar 31, 2026

It is ok, but I'm just not sure modifying Authorization header is the best example, because

  • this header is managed by the client itself
  • comment in ClientConfig suggest possible use cases like tracking headers etc.

So I would find example setting header like

  • X-Client-ID or
  • X-Source-App or
  • X-Tenant-ID

better. But I have no strong opinion about this. Technically GTG.

@NguyenHoangSon96
Copy link
Copy Markdown
Contributor Author

It is ok, but I'm just not sure modifying Authorization header is the best example, because

  • this header is managed by the client itself
  • comment in ClientConfig suggest possible use cases like tracking headers etc.

So I would find example setting header like

  • X-Client-ID or
  • X-Source-App or
  • X-Tenant-ID

better. But I have no strong opinion about this. Technically GTG.

Hi, suggestions make sense. I have updated the example.

Copy link
Copy Markdown
Contributor

@alespour alespour left a comment

Choose a reason for hiding this comment

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

👍

@NguyenHoangSon96 NguyenHoangSon96 merged commit f683160 into main Apr 1, 2026
15 checks passed
@NguyenHoangSon96 NguyenHoangSon96 deleted the feat/add-interceptor-example branch April 1, 2026 10:19
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.

4 participants