I ran the example given at the web site under Visual Studio 2017 Community Edition and it worked fine. However, when I attempted to run it on a winforms library, it hung, even when given the exact same term:
Console Version
static void Main(string[] args)
{
var newsApiClient = new NewsApiClient("KeyRedacted");
var articlesResponse = newsApiClient.GetEverything(new EverythingRequest
{
Q = "Apple",
SortBy = SortBys.Popularity,
Language = Languages.EN,
From = new DateTime(2018, 10, 16)
});
if (articlesResponse.Status == Statuses.Ok)
{
//code here
Winforms Version
private void btnSearch_Click(object sender, EventArgs e)
{
var newsApiClient = new NewsApiClient("keyredacted");
var articleResponse = newsApiClient.GetEverything(new EverythingRequest
{
Q = "Apple",
SortBy = SortBys.Popularity,
Language = Languages.EN,
From = new DateTime(2018, 10, 16)
}); //this is where it hangs
if (articleResponse.Status == Statuses.Ok)
{