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

Delphi change the assembly code of a running process -

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

C++ 11 "class" keyword -