If I pass single object like below, My controller is showing the data.
My C# library project.
var client = new HttpClient();
var response = await client.PostAsync(uri, myRequestObject, new JsonMediaTypeFormatter());
My Controller looks like this.
public async Task<Response> Execute(Request request)
{
this.Logger.Debug("Initializing Controller");
return await Task.Run(() => ExecuteRequest());
}
The above code is working and I am receiving the data from C# library.
I want to pass list of objects like this
var objectList = new List<RequestObject> { myRequestObject}
var client = new HttpClient();
var response = await client.PostAsync(uri, objectList , new JsonMediaTypeFormatter());
And I want my controller like this.
public async Task<Response> Execute(List<Request> request)
{
this.Logger.Debug("Initializing Controller");
return await Task.Run(() => ExecuteRequest());
}
Passing list is not working.