Created
December 24, 2013 15:46
-
-
Save darrelmiller/8114955 to your computer and use it in GitHub Desktop.
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
[Fact] | |
public void HttpMessageContent_from_a_file() | |
{ | |
var stream = | |
this.GetType().Assembly.GetManifestResourceStream("ClientSamples.StaticContent.HttpResponseMessage.txt"); | |
var content = new StreamContent(stream); | |
var contentType = new MediaTypeHeaderValue("application/http"); | |
contentType.Parameters.Add(new NameValueHeaderValue("msgtype", "response")); | |
content.Headers.ContentType = contentType; | |
var message = content.ReadAsHttpResponseMessageAsync().Result; | |
Assert.NotNull(message); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment