C# Class Simple.Rest.Extensions.RestClientExtensions

Extensions to make RestClient even easier!
Exibir arquivo Open project: oriches/Simple.Rest

Public Methods

Method Description
WithAnyEncoding ( this restClient ) : IRestClient

Adds both gzip & deflate encoding headers.

WithCookie ( this restClient, Cookie cookie ) : IRestClient

Add a cookie to the RestClient cookies..

WithCookie ( this restClient, string name, string value ) : IRestClient

Add a cookie to the RestClient cookies..

WithCredentials ( this restClient, ICredentials credentials ) : IRestClient

Adds the credentials to the RestClient header.

WithDeflateEncoding ( this restClient ) : IRestClient

Adds the deflate to the encoding header.

WithGzipEncoding ( this restClient ) : IRestClient

Adds the gzip to the encoding header.

Method Details

WithAnyEncoding() public static method

Adds both gzip & deflate encoding headers.
public static WithAnyEncoding ( this restClient ) : IRestClient
restClient this The RestClient interface.
return IRestClient

WithCookie() public static method

Add a cookie to the RestClient cookies..
public static WithCookie ( this restClient, Cookie cookie ) : IRestClient
restClient this The RestClient interface.
cookie System.Net.Cookie The cookie to be added.
return IRestClient

WithCookie() public static method

Add a cookie to the RestClient cookies..
public static WithCookie ( this restClient, string name, string value ) : IRestClient
restClient this The RestClient interface.
name string The name of the cookie to be added.
value string The value of the cookie to be added.
return IRestClient

WithCredentials() public static method

Adds the credentials to the RestClient header.
public static WithCredentials ( this restClient, ICredentials credentials ) : IRestClient
restClient this The RestClient interface.
credentials ICredentials The credentials to be added.
return IRestClient

WithDeflateEncoding() public static method

Adds the deflate to the encoding header.
public static WithDeflateEncoding ( this restClient ) : IRestClient
restClient this The RestClient interface.
return IRestClient

WithGzipEncoding() public static method

Adds the gzip to the encoding header.
public static WithGzipEncoding ( this restClient ) : IRestClient
restClient this The RestClient interface.
return IRestClient