javascript - setup main url for REST service calls in $.ajaxSetup() and only service methods in subsequent calls -
javascript - setup main url for REST service calls in $.ajaxSetup() and only service methods in subsequent calls -
i wanted see if there way rest, know can $.soap.
i want this, possible? see:
$.ajaxsetup({ cache: false, crossdomain: true, datatype: "json", url: "http://localhost:8080/warfile/rest-api/cmds/", });
then subsequent calls like:
$.ajax({ method: "setport", type: "post", data: json.stringify({ "port": "8431" }) });
after researching bit, discovered possible however, highly unadvisable per standards of using ajax.
javascript jquery ajax rest
Comments
Post a Comment