Hi,
When I call an Action with parameters I always get 400 BadRequest.
PseudeCode is as bellow.
Parameter names are correct.
URL is also correct - it works before adding the parameters (to both Action and message Content)
var message = new HttpRequestMessage(HttpMethod.Post, someURL);
var pars = new
{
requestType = "O"
, volumeNoteComment = "xx"
};
if (pars != null) message.Content =new JsonConvert(pars);
HttpClient client = new HttpClient();
/// here some client initialization....which is OK.
var response = client.SendAsync(message);
// response is 400 Bad request
Result of message.Content.ReadAsStringAsync():
Id = 769, Status = RanToCompletion, Method = "{null}", Result = "{\"requestType\":\"O\",\"volumeNoteComment\":\"xx\"}"
AsyncState: null
CancellationPending: false
CreationOptions: None
Exception: null
Id: 769
Result: "{\"requestType\":\"O\",\"volumeNoteComment\":\"xx\"}"
Status: RanToCompletion
Definition of arguments

*This post is locked for comments
I have the same question (0)