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

export of user-agent #34

Closed
k1de opened this issue Oct 20, 2023 · 3 comments
Closed

export of user-agent #34

k1de opened this issue Oct 20, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@k1de
Copy link

k1de commented Oct 20, 2023

@DoctorMcKay, could you please add an export of webUserAgent and mobileUserAgent, this is useful if we want to use the same user-agent in requests outside of the module and get it from module updates.

@k1de k1de added the enhancement New feature or request label Oct 20, 2023
@DoctorMcKay
Copy link
Owner

If you want to be sure the same user agent is used, you should set it explicitly yourself.

@k1de
Copy link
Author

k1de commented Oct 21, 2023

Yes, of course @DoctorMcKay , I can use userAgent option for webUserAgent from version v1.6.0, great!

But the request is to ensure backward compatibility in requests outside of the module for both webUserAgent and mobileUserAgent (I don’t think it will change soon, but it gives a feeling of security), and also with updating the module to receive updated “user-agent”.

after update v1.6.0 to get webUserAgent I can use some like
import { chrome } from '@doctormckay/user-agents'
or
import { defaultUserAgent } from 'steam-session/dist/helpers.js'
after update v1.6.0 I can't get mobileUserAgent.

In any case, thank you very much for your answer and your work.

@DoctorMcKay
Copy link
Owner

DoctorMcKay commented Oct 21, 2023

Sorry, this isn't something for which I want to increase the complexity of the public API contract. If you need to be sure that the same user-agent is being used, then you should define it yourself.

As for the mobile user-agent, that use case should be fixed by adding an option to specify your own mobile user-agent (and device name) details (#35).

@DoctorMcKay DoctorMcKay closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants