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

Improve User-Agent and documentation #208

Merged
merged 1 commit into from Aug 2, 2019
Merged

Improve User-Agent and documentation #208

merged 1 commit into from Aug 2, 2019

Conversation

pyfisch
Copy link
Contributor

@pyfisch pyfisch commented Dec 22, 2018

Use and recommend format from RFC 7231.
Give examples for custom User-Agent strings.

Closes #49

@pyfisch
Copy link
Contributor Author

pyfisch commented Dec 22, 2018

I think the helper method is not needed. As the preferred grammar is now stated it is easy for consumers to produce correct user agents. If a tool needs more flexibility one can use format to create user agent strings.

An alternative would be to allow passing tuples: clients_useragent=('MyCoolTool', '0.5', 'User:Xyz') and convert them to a user agent string.

mwclient/client.py Outdated Show resolved Hide resolved
Use and recommend format from RFC 7231.
Give examples for custom User-Agent strings.

Closes #49
@danmichaelo danmichaelo merged commit d94446a into mwclient:master Aug 2, 2019
@pyfisch pyfisch deleted the user-agent branch August 3, 2019 07:53
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.

make it easy for users to personalize user-agents (examples, helper method)
2 participants