Table of Contents

Method PostAsync

Namespace
CurlUnity.Http

PostAsync(IHttpClient, string, byte[], string, CancellationToken)

发送一个 POST 请求,body 为 raw bytes,附带指定 contentType

public static Task<IHttpResponse> PostAsync(this IHttpClient client, string url, byte[] body, string contentType = "application/octet-stream", CancellationToken ct = default)

Parameters

client IHttpClient
url string
body byte[]
contentType string
ct CancellationToken

Returns

Task<IHttpResponse>