i am sending data using HttpClient like below
using (var streamWriter = new StreamWriter(request.GetRequestStream())) { streamWriter.Write(JsonConvert.SerializeObject(message).ToArray()); }by using ToArray() entire message converted to character array
what would be the web api controller method parameter
i am going to use like below
public IHttpActionResult ReceivedMessages([FromBody] Queue messages) I have tried char[] array and string[] array also. i am getting null value always. But if i checked this
request.Content.ReadAsStringAsync().Result i am receiving the value in string format but in controller class i am getting null
Mayank Gaur128 reputationPosted Apr 26, 2017, 8:27 PM EDT
Manas MohapatraRank #182 · 13.2K reputationPosted Apr 26, 2017, 9:27 PM EDT