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

Update fetch file to centralize default headers #620

Merged

Conversation

yashkohli88
Copy link
Contributor

Description:

This pull request focuses on refactoring the code to centralize the declaration of default headers in a single fetch.js file, updating all fetch functions in various package managers across the project to use the centralized user-agent header, and adding tests to validate these changes. Below are the tasks accomplished:

Checklist:

  • Refactored code to centralize default headers in fetch.js.
  • Updated all fetch functions to use the centralized default headers.
  • Added tests to validate the changes.
  • Ran all existing and new tests to ensure correctness.

This PR is related to issue - #619

Copy link
Collaborator

@qtomlinson qtomlinson left a comment

Choose a reason for hiding this comment

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

Thanks for the refactoring!

test/unit/lib/fetchTests.js Outdated Show resolved Hide resolved
test/unit/providers/fetch/mavenBasedFetchTests.js Outdated Show resolved Hide resolved
Copy link
Contributor

@ljones140 ljones140 left a comment

Choose a reason for hiding this comment

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

Looks great.
nice improvement to make sure we have consistent headers

@yashkohli88 yashkohli88 marked this pull request as ready for review November 3, 2024 05:05
@qtomlinson qtomlinson merged commit 59e652b into clearlydefined:master Nov 5, 2024
2 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