mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-30 14:22:20 +02:00
ct
This commit is contained in:
@@ -8,12 +8,12 @@ namespace System.Net.Http;
|
||||
/// </summary>
|
||||
internal static class HttpClientExtensions
|
||||
{
|
||||
public static Task<Stream> GetStreamAsync(this HttpClient client, Uri requestUri, CancellationToken _)
|
||||
public static Task<Stream> GetStreamAsync(this HttpClient client, string requestUri, CancellationToken _)
|
||||
{
|
||||
return client.GetStreamAsync(requestUri);
|
||||
}
|
||||
|
||||
public static Task<HttpResponseMessage> GetAsync(this HttpClient client, Uri requestUri, CancellationToken _)
|
||||
public static Task<HttpResponseMessage> GetAsync(this HttpClient client, string requestUri, CancellationToken _)
|
||||
{
|
||||
return client.GetAsync(requestUri);
|
||||
}
|
||||
|
||||
@@ -13,9 +13,19 @@ internal static class HttpContentExtensions
|
||||
return content.ReadAsStringAsync();
|
||||
}
|
||||
|
||||
public static Task<string> ReadAsStringAsync(this StringContent content, CancellationToken _)
|
||||
{
|
||||
return content.ReadAsStringAsync();
|
||||
}
|
||||
|
||||
public static Task<byte[]> ReadAsByteArrayAsync(this HttpContent content, CancellationToken _)
|
||||
{
|
||||
return content.ReadAsByteArrayAsync();
|
||||
}
|
||||
|
||||
public static Task<byte[]> ReadAsByteArrayAsync(this ByteArrayContent content, CancellationToken _)
|
||||
{
|
||||
return content.ReadAsByteArrayAsync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user