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

feat: use user agent for requests from auth object #122

Closed
wants to merge 1 commit into from

Conversation

pavanjoshi914
Copy link
Contributor

No description provided.

@@ -52,6 +52,11 @@ export async function request({
const authHeader = auth
? await auth.getAuthHeader(url.href, method)
: undefined;

let userAgent;
if(auth?.getUserAgent)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not needed

this.defaultRequestOptions from the Client class is passed to rest which is passed to this request method.

You don't need to add a function getUserAgent.

Can you please undo the change, test this locally and make sure the user agent is being passed in every request, and if not, why?

@pavanjoshi914
Copy link
Contributor Author

closing it as we now decided to use user-agent passed in default request options object and not auth object

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.

2 participants