public RestRequest(string resource) { PathParams = new PathParams(); Resource = resource; Headers = new WebHeaderCollection { { HttpRequestHeader.CacheControl, "no-store, must-revalidate" }, { HttpRequestHeader.AcceptEncoding, "gzip" } }; Advanced = new AdvancedRestRequest(this); AllowAutoRedirect = true; AllowWriteStreamBuffering = true; AuthenticationLevel = AuthenticationLevel.MutualAuthRequested; AutomaticDecompression = DecompressionMethods.None; CachePolicy = new RequestCachePolicy(RequestCacheLevel.BypassCache); ClientCertificates = new X509Certificate2Collection(); ContentLength = 0; ContentType = ContentType.TXT; Encoding = Encoding.UTF8; HttpMethod = HttpMethod.GET; ImpersonationLevel = TokenImpersonationLevel.Delegation; KeepAlive = true; MaximumAutomaticRedirections = 50; MaximumResponseHeadersLength = 64; Pipelined = true; ProtocolVersion = new Version(1, 1); ReadWriteTimeout = 300000; QueryString = new QueryString(); Timeout = GlobalTimeout; }
public void Reset() { Payload = null; PathParams.Clear(); QueryString.Clear(); }