I'm really new to this flavour of dev so please forgive me and ignore my bad practices for the time being.
I've got this POST call in my server side which at the moment just logs what is sent and returns a status code. However, when I change public HttpResponseMessage PostTaggedText(String[] issueArray) to public HttpResponseMessage PostTaggedText(String issueArray) it returns a 404?
All my GET requests work completely fine - why does it not like this one?
Here's the whole method:
[HttpPost,ActionName("posttaggedtext")]
public HttpResponseMessage PostTaggedText(String[] issueArray)
{
System.Diagnostics.Debug.WriteLine(issueArray);
return new HttpResponseMessage(HttpStatusCode.OK);
}
And here's the jquery script that calls this:
$(document).on("click", "#save", function () {
var array = new Array();
$("input:checkbox:checked").map(function () {
array.push(this.id);
}).get();
$.post("http://localhost:48527/api/webapp/posttaggedtext", data=array, function (response) {
alert(data);
alert(response);
});
})
Aucun commentaire:
Enregistrer un commentaire