C# Class Microsoft.Iot.IotCoreAppDeployment.RestHelper

ファイルを表示 Open project: ms-iot/iot-utilities Class Usage Examples

Public Methods

Method Description
CreateUri ( string restPath ) : Uri
CreateUri ( string restPath, string>.Dictionary arguments ) : Uri
EscapeUriString ( string toEncodeString ) : string
ProcessJsonResponse ( HttpWebResponse response, Type dataContractType ) : object
RestHelper ( IPAddress ipAddress, UserInfo deviceAuthentication ) : System
SendRequestAsync ( Uri requestUrl, HttpMethod method, string passwordToUse, CancellationToken cts ) : Task
SendRequestAsync ( Uri requestUrl, HttpMethod method, string passwordToUse, IEnumerable files, CancellationToken cts ) : Task
SendRequestAsync ( string restPath, HttpMethod method, string passwordToUse, CancellationToken cts ) : Task
SendRequestAsync ( string restPath, HttpMethod method, string passwordToUse, IEnumerable files, CancellationToken cts ) : Task

Private Methods

Method Description
ConfigureRequest ( HttpWebRequest request, IEnumerable files ) : Task
ConfigureRequest ( HttpWebRequest request ) : void
HandleError ( WebException exception ) : HttpErrorResult
HttpCancellationHelper ( HttpWebRequest request, CancellationToken cts ) : void

Method Details

CreateUri() public method

public CreateUri ( string restPath ) : Uri
restPath string
return System.Uri

CreateUri() public method

public CreateUri ( string restPath, string>.Dictionary arguments ) : Uri
restPath string
arguments string>.Dictionary
return System.Uri

EscapeUriString() public static method

public static EscapeUriString ( string toEncodeString ) : string
toEncodeString string
return string

ProcessJsonResponse() public static method

public static ProcessJsonResponse ( HttpWebResponse response, Type dataContractType ) : object
response System.Net.HttpWebResponse
dataContractType System.Type
return object

RestHelper() public method

public RestHelper ( IPAddress ipAddress, UserInfo deviceAuthentication ) : System
ipAddress System.Net.IPAddress
deviceAuthentication UserInfo
return System

SendRequestAsync() public method

public SendRequestAsync ( Uri requestUrl, HttpMethod method, string passwordToUse, CancellationToken cts ) : Task
requestUrl System.Uri
method HttpMethod
passwordToUse string
cts System.Threading.CancellationToken
return Task

SendRequestAsync() public method

public SendRequestAsync ( Uri requestUrl, HttpMethod method, string passwordToUse, IEnumerable files, CancellationToken cts ) : Task
requestUrl System.Uri
method HttpMethod
passwordToUse string
files IEnumerable
cts System.Threading.CancellationToken
return Task

SendRequestAsync() public method

public SendRequestAsync ( string restPath, HttpMethod method, string passwordToUse, CancellationToken cts ) : Task
restPath string
method HttpMethod
passwordToUse string
cts System.Threading.CancellationToken
return Task

SendRequestAsync() public method

public SendRequestAsync ( string restPath, HttpMethod method, string passwordToUse, IEnumerable files, CancellationToken cts ) : Task
restPath string
method HttpMethod
passwordToUse string
files IEnumerable
cts System.Threading.CancellationToken
return Task