Show / Hide Table of Contents

Class HttpClientConnection

HttpClientを使用してHTTP接続を行う

Inheritance
Object
HttpClientConnection
Implements
IHttpConnection
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Pixiv.VroidSdk.Networking.Connections
Assembly: Pixiv.VroidSdk.dll
Syntax
public sealed class HttpClientConnection : IHttpConnection

Constructors

HttpClientConnection(HttpClient, IHttpUrl, IHttpHeader, SynchronizationContext)

コンストラクタ

Declaration
public HttpClientConnection(HttpClient client, IHttpUrl url, IHttpHeader header, SynchronizationContext context)
Parameters
Type Name Description
HttpClient client

HTTP接続クライアント

IHttpUrl url

接続先URL

IHttpHeader header

リクエストHTTPヘッダ

SynchronizationContext context

コールバックを呼び出す際のSynchronizationContext

Properties

Header

HTTPのリクエストヘッダ

Declaration
public IHttpHeader Header { get; set; }
Property Value
Type Description
IHttpHeader

OnDownloadProgressChanged

ダウンロードの進捗があった場合のコールバック

Declaration
public Action<float> OnDownloadProgressChanged { get; set; }
Property Value
Type Description
Action<Single>

OnUploadProgressChanged

アップロードの進捗があった場合のコールバック

Declaration
public Action<float> OnUploadProgressChanged { get; set; }
Property Value
Type Description
Action<Single>

Param

HTTPリクエストのパラメータ

Declaration
public IHttpParam Param { get; set; }
Property Value
Type Description
IHttpParam

Url

URL

Declaration
public IHttpUrl Url { get; }
Property Value
Type Description
IHttpUrl

Methods

BuildUrl()

クエリパラメータを含むURLを返す

Declaration
public string BuildUrl()
Returns
Type Description
String

URL文字列

DeleteAsync()

DELETEリクエストを行う

Declaration
public Task<IHttpResponse> DeleteAsync()
Returns
Type Description
Task<IHttpResponse>

DELETEリクエストのレスポンス

Exceptions
Type Condition
HttpRequestFailedException

HTTPリクエスト失敗

DeleteAsync(Action<IHttpResponse>, Action<HttpRequestFailedException>)

DELETEリクエストを行う

Declaration
public void DeleteAsync(Action<IHttpResponse> onSuccess, Action<HttpRequestFailedException> onError)
Parameters
Type Name Description
Action<IHttpResponse> onSuccess

成功コールバック

Action<HttpRequestFailedException> onError

失敗コールバック

GetAsync()

GETリクエストを行う

Declaration
public Task<IHttpResponse> GetAsync()
Returns
Type Description
Task<IHttpResponse>

GETリクエストのレスポンス

Exceptions
Type Condition
HttpRequestFailedException

HTTPリクエスト失敗

GetAsync(Action<IHttpResponse>, Action<HttpRequestFailedException>)

GETリクエストを行う

Declaration
public void GetAsync(Action<IHttpResponse> onSuccess, Action<HttpRequestFailedException> onError)
Parameters
Type Name Description
Action<IHttpResponse> onSuccess

成功コールバック

Action<HttpRequestFailedException> onError

失敗コールバック

PostAsync()

Postリクエストを行う

Declaration
public Task<IHttpResponse> PostAsync()
Returns
Type Description
Task<IHttpResponse>

Postリクエストのレスポンス

Exceptions
Type Condition
HttpRequestFailedException

HTTPリクエスト失敗

PostAsync(Action<IHttpResponse>, Action<HttpRequestFailedException>)

POSTリクエストを行う

Declaration
public void PostAsync(Action<IHttpResponse> onSuccess, Action<HttpRequestFailedException> onError)
Parameters
Type Name Description
Action<IHttpResponse> onSuccess

成功コールバック

Action<HttpRequestFailedException> onError

失敗コールバック

PutAsync()

PUTリクエストを行う

Declaration
public Task<IHttpResponse> PutAsync()
Returns
Type Description
Task<IHttpResponse>

PUTリクエストのレスポンス

Exceptions
Type Condition
HttpRequestFailedException

HTTPリクエスト失敗

PutAsync(Action<IHttpResponse>, Action<HttpRequestFailedException>)

PUTリクエストを行う

Declaration
public void PutAsync(Action<IHttpResponse> onSuccess, Action<HttpRequestFailedException> onError)
Parameters
Type Name Description
Action<IHttpResponse> onSuccess

成功コールバック

Action<HttpRequestFailedException> onError

失敗コールバック

Implements

IHttpConnection
In This Article
Back to top Generated by DocFX