Created
September 5, 2012 03:21
-
-
Save darrelmiller/3629815 to your computer and use it in GitHub Desktop.
Alternative handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, | |
CancellationToken cancellationToken) | |
{ | |
var tcs = new TaskCompletionSource<HttpResponseMessage>(); | |
Interlocked.Increment(ref count); | |
var response = new HttpResponseMessage(HttpStatusCode.OK) | |
{ | |
Content = new StringContent("HELLO WORLD") | |
}; | |
tcs.SetResult(response); | |
return tcs.Task; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment