I am trying to pass values from angular to a web api.
Currently what I have for angular which does communicate with the webapi since I have it counting when something connects to it.
var data = new FormData();
data.append("x", "1");
data.append("y", "2");
$scope.http({ method: 'PUT', url: urltowebapi, data: data });
What I have on the webapi side is supposed to read the values but it always comes back as {}.
HttpContent req = Request.Content;
string str = req.ReadAsStringAsync().Result;
Requestrather than using JSON serialization to pass the data to your controller?