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

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -