This project is read-only.

PostAsJsonAsync should respect JsonConvert.DefaultSetttings.

Topics: ASP.NET Web API
Mar 3, 2014 at 12:13 AM
If I need to configure json settings to e.g. serialize enums as strings the only option to accomplish that is to instantiate JsonMediaTypeFormatter and include it in every call to PostAsAsync:
client.PostAsync(uri, data, formatter)
I think there should be a way to specify default settings or have that method respect JsonConvert.DefaultSettings.
Mar 3, 2014 at 5:28 PM
Sounds worth considering - please open an issue in our issue tracker and we will take a look.
Mar 4, 2014 at 9:46 PM
Also, it really sucks that you have to specify a formatter with PostAsJSONAsync... I have a custom json formatter that I specified when I created my in memory host... Yet you guys completely ignore that one and use one that's specified at the client level WHICH SUCKS.