I need to send two objects to the post and update methods to an Api web, I work with c #, webapi, mvc. He is not taking it.
var album = {
nombre: "PowerAge",
Fecha: "011/10/1979"
}
var user = {
Name: "Rick"
area: "operaciones"
}
$.ajax(
{
url: "samples/PostAlbum",
type: "POST",
contentType: "application/json",
data: JSON.stringify({ album: album, user: user }),
success: function (result) {
alert(result);
}
});
Api
[HttpPost]
public IHttpActionResult PostAlbum(album item, user itemuser)
{
}