I have the following post method in my WEB API controller:
public async Task<HttpResponseMessage> SendPost(Application application) I call it through javascript using angular.js $http.post and pass through the application parameter as JSON:
$http.post("/api/AController/SendPost", JSON.stringify(application)). success(function (data, status, headers, config) { } This works.
Now I want to pass through a second parameter as a simple string (I can't modify the existing application JSON object).I tried a few different ways suggested on the web but none of them seem to work. I need to be able to do soemthing like this:
Controller:
public async Task<HttpResponseMessage> SendPost(RentalApplication application,string test) Javascript:
$http.post("/api/TessIntegration/SendPost", {application:JSON.stringify(application),test:"Some value"}). success(function (data, status, headers, config) { }