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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -