diff --git a/smsapi/NativeHttpClientHelper.cs b/smsapi/NativeHttpClientHelper.cs index 51776a0..361d4ef 100644 --- a/smsapi/NativeHttpClientHelper.cs +++ b/smsapi/NativeHttpClientHelper.cs @@ -31,21 +31,21 @@ public static async Task SendRequest( case RequestMethod.GET: var getResponse = await httpClient.GetAsync(uri, cancellationToken); - return new HttpResponseEntity(getResponse.Content.ReadAsStreamAsync(cancellationToken), getResponse.StatusCode); + return new HttpResponseEntity(getResponse.Content.ReadAsStreamAsync(), getResponse.StatusCode); case RequestMethod.POST: httpContent = ConvertRequestDataToHttpContent(actionContentType, body, files); var postResponse = await httpClient.PostAsync(uri, httpContent, cancellationToken); - return new HttpResponseEntity(postResponse.Content.ReadAsStreamAsync(cancellationToken), postResponse.StatusCode); + return new HttpResponseEntity(postResponse.Content.ReadAsStreamAsync(), postResponse.StatusCode); case RequestMethod.PUT: httpContent = ConvertRequestDataToHttpContent(actionContentType, body, files); var putResponse = await httpClient.PutAsync(uri, httpContent, cancellationToken); - return new HttpResponseEntity(putResponse.Content.ReadAsStreamAsync(cancellationToken), putResponse.StatusCode); + return new HttpResponseEntity(putResponse.Content.ReadAsStreamAsync(), putResponse.StatusCode); case RequestMethod.DELETE: var deleteResult = await httpClient.DeleteAsync(uri, cancellationToken); - return new HttpResponseEntity(deleteResult.Content.ReadAsStreamAsync(cancellationToken), deleteResult.StatusCode); + return new HttpResponseEntity(deleteResult.Content.ReadAsStreamAsync(), deleteResult.StatusCode); default: throw new ArgumentOutOfRangeException(nameof(method), method, null); }