C# Class Swensen.Ior.Core.IorClient

A light wrapper around our underlying http client.
Exibir arquivo Open project: SwensenSoftware/im-only-resting Class Usage Examples

Public Methods

Method Description
Base64EncodeUrlUserInfo ( Uri uri ) : string

Url decodes the Url.UserInfo then encodes it as base64 string from its ASCII bytes.

ExecuteAsync ( RequestModel requestModel, Action callback ) : CancellationTokenSource

Execute a request for the given requestModel asynchronously, executing the given callback upon completions other than cancellations (gui updates for cancellation should be done at point of cancellation).

GetEncodedBytes ( string content, string charset, bool includeUtf8Bom ) : byte[]
IorClient ( string defaultRequestContentType, string proxyServer, bool includeUtf8Bom, bool followRedirects, bool enableAutomaticContentDecompression ) : System

Method Details

Base64EncodeUrlUserInfo() public static method

Url decodes the Url.UserInfo then encodes it as base64 string from its ASCII bytes.
public static Base64EncodeUrlUserInfo ( Uri uri ) : string
uri System.Uri
return string

ExecuteAsync() public method

Execute a request for the given requestModel asynchronously, executing the given callback upon completions other than cancellations (gui updates for cancellation should be done at point of cancellation).
public ExecuteAsync ( RequestModel requestModel, Action callback ) : CancellationTokenSource
requestModel RequestModel
callback Action
return System.Threading.CancellationTokenSource

GetEncodedBytes() public static method

public static GetEncodedBytes ( string content, string charset, bool includeUtf8Bom ) : byte[]
content string
charset string
includeUtf8Bom bool
return byte[]

IorClient() public method

public IorClient ( string defaultRequestContentType, string proxyServer, bool includeUtf8Bom, bool followRedirects, bool enableAutomaticContentDecompression ) : System
defaultRequestContentType string
proxyServer string
includeUtf8Bom bool
followRedirects bool
enableAutomaticContentDecompression bool
return System