3
Mac OS X의 Mono (3.2.1)에서이 간단한 테스트를 실행하면 콘솔에 응답을 인쇄하지 않고 대신 Shutting down finalizer thread timed out.
이 코드에 문제가 있습니까? 아니면 내 모노 오작동?Mono에서 간단한 HttpClient 테스트가 실패 함
using System;
using System.Net.Http;
namespace VendTest
{
class MainClass
{
public static void Main(string[] args)
{
Client client = new Client();
client.HttpClientCall();
}
}
public class Client
{
HttpClient client;
public Client()
{
client = new HttpClient();
}
public async void HttpClientCall()
{
HttpClient httpClient = new HttpClient();
HttpResponseMessage response = await httpClient.GetAsync("http://vendhq.com");
string responseAsString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseAsString);
}
}
}
지식이 애매한 부분에 대한 감사합니다! 지금 그것은 작동합니다 :) –