Skip to content

Feature: allow user to set useragent header #87

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

Closed
MingweiSamuel opened this issue Sep 8, 2019 · 1 comment
Closed

Feature: allow user to set useragent header #87

MingweiSamuel opened this issue Sep 8, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MingweiSamuel
Copy link
Contributor

MingweiSamuel commented Sep 8, 2019

Implementation: remove this line https://github.com/sirkris/Reddit.NET/blob/master/src/Reddit.NET/Models/Internal/Request.cs#L154
And add RestClient-level user-agent as described here: restsharp/RestSharp#787
Would need to be set in https://github.com/sirkris/Reddit.NET/blob/master/src/Reddit.NET/RedditAPI.cs#L60-L65

@sirkris sirkris self-assigned this Nov 12, 2019
@sirkris
Copy link
Owner

sirkris commented Nov 24, 2019

Merged into 1.3.

Usage Example:

RedditAPI reddit = new RedditAPI("AppId", "RefreshToken", userAgent: "My App or Library v1.0.0");

In the above example, all requests performed by the reddit instance will have a User-Agent of "My App or Library v1.0.0 (via Reddit.NET v1.3.0)".

@sirkris sirkris closed this as completed Nov 24, 2019
@sirkris sirkris added the enhancement New feature or request label Nov 24, 2019
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