public static ClientServiceRequest <TResponse> SetDefault <TResponse>( this ClientServiceRequest <TResponse> request) { request.ClearExecInterceptors(); var res = request .AddUserAgent(string.Empty) .AddAcceptEncoding("gzip") .AddContentType("application/x-www-form-urlencoded; charset=UTF-8") .AddConnection("Keep-Alive"); return(res); }
public static ClientServiceRequest <TResponse> SetAuthCookies <TResponse>( this ClientServiceRequest <TResponse> request, AuthCookies authCookies) { request.ClearExecInterceptors(); var res = request .AddUserAgent(HttpConst.UserAgent) .AddConnection("keep-alive") .AddAccept("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8") .AddAcceptLanguage("en-US,en;q=0.8") .AddUpgradeInsecureRequests("1"); if (authCookies != null) { res = res.AddCookies(authCookies); } return(res); }