Skip to content

feat: add custom User-Agent to requests - #92

Merged
maxd-nordic merged 2 commits into
mainfrom
noahp/user-agent
Jul 29, 2026
Merged

feat: add custom User-Agent to requests#92
maxd-nordic merged 2 commits into
mainfrom
noahp/user-agent

Conversation

@noahp

@noahp noahp commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

For identifying tool usage on the backend side, add a custom user agent to
HTTP requests.

Example:

nrfcloud-utils/0.0.1 (Linux 7.0.0-27-generic; Python 3.14.0)

For identifying tool usage on the backend side, add a custom user agent to
HTTP requests.

Copilot AI left a comment

Copy link
Copy Markdown

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 consistent, identifiable User-Agent string to outgoing HTTP requests from the nrfcloud-utils tooling to help backend-side request attribution.

Changes:

  • Introduces a shared USER_AGENT constant (including package version + OS/Python info) in cli_helpers.py.
  • Adds the User-Agent header to multiple requests calls across onboarding, DIAP, and device management utilities.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/nrfcloud_utils/nrf93_onboard.py Adds User-Agent header to tenant fetch and device onboarding requests.
src/nrfcloud_utils/nrf_cloud_onboard.py Adds User-Agent header to several device management/onboarding API calls.
src/nrfcloud_utils/nrf_cloud_diap.py Ensures auth header helper also includes the shared User-Agent.
src/nrfcloud_utils/nrf_cloud_device_mgmt.py Adds User-Agent header to bundle/device listing and FOTA job creation calls.
src/nrfcloud_utils/cli_helpers.py Defines the shared USER_AGENT string using installed package metadata.

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

Comment thread src/nrfcloud_utils/nrf93_onboard.py
@noahp
noahp marked this pull request as ready for review July 28, 2026 15:44
@maxd-nordic
maxd-nordic merged commit 8221c40 into main Jul 29, 2026
5 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.

4 participants