wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
337 stars 129 forks source link

Is it possible to assign Useragent and Referer? #207

Open shityakov opened 4 years ago

shityakov commented 4 years ago

Is it possible to assign Useragent and Referer? I do not see this possibility and the server blocks my ip due to lack of UserAgent and Referer

ThomasPe commented 4 years ago

This is currently not supported, but I'd welcome PRs that allow an optional override of these.

ThomasPe commented 3 years ago

Duplicate: https://github.com/wp-net/WordPressPCL/issues/179

ThomasPe commented 3 years ago

I've updated the wiki to show how this could be achieved by injecting a custom HttpClient instance. Would this work for you @shityakov? https://github.com/wp-net/WordPressPCL/wiki/HttpClient-Injection

shityakov commented 3 years ago

thanks