How can I use this android ajax query to make a http post request with parameters?
String url = "http://www.mysitecom/MyService.asmx/GetJson";
// I want to add an string parameter to this query and make it HTTP POST
aq.ajax(url, JSONObject.class, new AjaxCallback<JSONObject>() {
@Override
public void callback(String url, JSONObject json, AjaxStatus status) {
if(json != null){
//successful ajax call, show status code and json content
Toast.makeText(aq.getContext(), status.getCode() + ":" + json.toString(), Toast.LENGTH_LONG).show();
}else{
//ajax error, show error code
Toast.makeText(aq.getContext(), "Error:" + status.getCode(), Toast.LENGTH_LONG).show();
}
}
});
I found the answer:
}