Javascript:
$.post("/DataAPI/messageProcessor", { query: "Hello World!" }, function (data) {
Handle(data);
}
});
コントローラ:
[System.Web.Http.AcceptVerbs("Post")]
[System.Web.Http.ActionName("messageProcessor")]
public ResponseModel messageProcessor(string query)
{
ResponseModel model=DoStuff(query);
return model;
}
queryコントローラからアクセスするにはどうすればよいですか。常にとして到着しquery == nullます。利用可能なオブジェクトもありRequestますが、そのメンバーをナビゲートして自分のに到達する方法がわかりません"Hellow World!"。