Skip to content

Conversation

@zhaodongwang-msft
Copy link
Collaborator

This pull request updates the User-Agent header in the OData client to include the SDK version, improving traceability and debugging of requests made by the SDK.

HTTP header improvements:

  • Added import of the SDK version from src/dataverse_sdk/__version__.py and constructed a _USER_AGENT string with the format DataversePythonSDK/{version} in src/dataverse_sdk/odata.py.
  • Updated the _headers method to use the new _USER_AGENT value for the User-Agent header, ensuring requests identify the SDK version.

Copilot AI review requested due to automatic review settings November 10, 2025 18:15
Copy link
Contributor

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

This PR adds version information to the User-Agent header for HTTP requests made by the Dataverse Python SDK. Previously, the User-Agent was hardcoded as "DataversePythonSDK" without version information.

  • Imports the SDK version from __version__.py
  • Creates a module-level _USER_AGENT constant with version information
  • Updates the _headers() method to use the versioned User-Agent
  • Removes the TODO comment about adding version to User-Agent

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

suyask-msft
suyask-msft previously approved these changes Nov 10, 2025
@zhaodongwang-msft zhaodongwang-msft merged commit 6d49fc8 into main Nov 10, 2025
4 checks passed
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