I have been trying to expand on my Account Controller for my web api however I cannot seem to get new actions to work. I just want an action that intakes a string. So I wrote my action like this:
Update: This action works if I remove the parameter (String val) now = ()
[AllowAnonymous]
[Route("Stuff")]
public IHttpActionResult Stuff(String val)
{
return Ok();
}
Then in my AngularJS I wrote a function to call into my action
function storeConnID (event, data){
return $http({
url: State.Endpoint + "/api/account/stuff",
method: "POST",
headers: {
'Authorization' : 'Bearer '+ State.User.Access_Token
},
data: {
val: data
}
}).then(function (res) { }, function (err) {
console.log(err);
});
};
The url after it is all formatted is as such:
Every other action in my controller works however I cannot create new ones?