I have an AngularJS app that has to post data to a 3rd party URL. To get around the CORS browser issue, I am posting the data to my .net controller which will then post it to the 3rd party URL. In my javascript file, I've built the query string I want to pass to the 3rd party URL. Here is my code that posts to my .net controller:
var parms = "name=john&phone=1234567890&sex=male";
return $http({
url: '/UserForm/PostData/',
method: "POST",
data: parms
});
My c# controller:
[HttpPost]
public string PostData(String parms)
{
return "";
}
the parms variable in PostData is null. What do I need to do to pass my querystring string to my controller?