diff --git a/RestAPI.cs b/RestAPI.cs index e1f8194..a2f7ef5 100644 --- a/RestAPI.cs +++ b/RestAPI.cs @@ -223,7 +223,9 @@ public virtual async Task SendHttpClientRequest(string endpoint, Requ // start the stream immediately httpWebRequest.Method = method.ToString(); httpWebRequest.AllowReadStreamBuffering = false; - + //https://github.com/XiaoFaye/WooCommerce.NET/issues/785 + httpWebRequest.UserAgent = @"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36"; + if (webRequestFilter != null) webRequestFilter.Invoke(httpWebRequest);