public void Enqueue(Func<HttpRequestMessage, HttpResponseMessage> handler)
{
- this.Queue.Enqueue(x => Task.FromResult(handler(x)));
+ this.Queue.Enqueue(x => Task.Run(() => handler(x)));
}
- protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
+ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var handler = this.Queue.Dequeue();
- return handler(request);
+ return await handler(request);
}
}
}
};
var thumb = await service.GetThumbnailInfoAsync(
- "https://foursquare.com/checkin/hogehoge/xxxxxxxx",
+ "https://foursquare.com/hogehoge/checkin/xxxxxxxx",
post, CancellationToken.None);
}
};
var thumb = await service.GetThumbnailInfoAsync(
- "https://foursquare.com/checkin/hogehoge/xxxxxxxx?s=aaaaaaa",
+ "https://foursquare.com/hogehoge/checkin/xxxxxxxx?s=aaaaaaa",
post, CancellationToken.None);
}
};
var thumb = await service.GetThumbnailInfoAsync(
- "https://foursquare.com/checkin/hogehoge/xxxxxxxx?s=aaaaaaa",
+ "https://foursquare.com/hogehoge/checkin/xxxxxxxx?s=aaaaaaa",
post, CancellationToken.None);
}