I was looking at https://stackoverflow.com/a/15873977 but it didn't work for me.
If my Post method has a parameter named Message
(an object of my own class), and I do not apply the [FromBody]
attribute to it, is it possible to pass the parameter Message
, json serialized and urlEncoded, on the query string instead of in the Post body?
I tried passing ?Message=%7B+%22Sender%22%3A...+%7D
(which if decoded would be Message={ "Sender":... }
) but the Message
parameter is still received as null in the method.
Should the query string key be Message, the name of the parameter, or the class name of the parameter or something else?