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

Rework low-level HTTP methods and Response structure #44555

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

alzimmermsft
Copy link
Member

Description

This PR is overhauling low-level design concepts with HttpClient.send, HttpPipeline.send, and associated policy classes to explicitly return Response<BinaryData> rather than Response<?> and removed HttpResponse and makes Response a class instead of an interface.

The reasoning behind this change is the pattern for handling conversion of the raw network response to the SDK Response<T> was forcing the use of HttpResponse and HttpResponseAccessHelper from outside libraries, and that Response vs HttpResponse caused confusion on which should be used. This simplifies the story to be:

  1. Any interactions at or near the networking layer strictly work with BinaryData.
  2. When we're switching from the networking layer to SDK layer we take the raw BinaryData payload and convert it to T.

This removes the need for hidden deserialization and exposing implementation packages outside of ClientCore.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 7, 2025

API change check

API changes are not detected in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants