public async void Test_Default_Http_Get_Success() { var factory = ReturnHttpClientFactory(); var client = new DefaultHttpClient(factory); var r = await client.GetAsync <string>("http://www.baidu.com", requestType : RequestType.QueryString); Assert.NotEmpty(r); }
public override async Task ExecuteAsync(WorkloadContext context) { var response = await DefaultHttpClient.GetAsync(url, context.CancellationToken).ConfigureAwait(false); await ReadResponseAsync(response, context.CancellationToken).ConfigureAwait(false); }