How to add data along with dojo get request -
here example of dojo post request
require(["dojo/request", "dojo/domready!"], function (request) { request.post("newjsp.jsp", { data: { color: "blue" } }).then(function (response) { alert(response); }, function (error) { alert(error); }); });
in code have attched attribute color data
how in dojo request
require(["dojo/request", "dojo/domready!"], function (request) { request.get("newjsp.jsp", { data: { color: "blue" } }).then(function (response) { alert(response); }, function (error) { alert(error); }); });
this code not working how fix??
use content
instead of data
.
require(["dojo/request", "dojo/domready!"], function (request) { request.get("newjsp.jsp", { query: { color: "blue" } }).then(function (response) { alert(response); }, function (error) { alert(error); }); });
Comments
Post a Comment