Created
September 13, 2013 08:07
-
-
Save daanl/6547940 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
public class JsonContent : StringContent | |
{ | |
public JsonContent(object contentObject) : base(JsonConvert.SerializeObject(contentObject), Encoding.UTF8, "application/json") {} | |
public JsonContent(string content) : base(content) {} | |
public JsonContent(string content, Encoding encoding) : base(content, encoding) {} | |
public JsonContent(string content, Encoding encoding, string mediaType) : base(content, encoding, mediaType) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment