Questions tagged [dojo.xhrget]

`dojo/request/xhr` deprecates `dojo/_base/xhr` and is part of Dojo’s Request API.

dojo/request/xhr deprecates dojo/_base/xhr and is part of Dojo’s Request API.

XMLHttpRequest (XHR) is the core of AJAX development and provides an asynchronous way for sending and receiving information in a browser based platform. This module is implemented in a cross-browser fashion so that end developer don’t need to be aware of the differences between different browsers in order to use the functionality.

8 questions
1
vote
2 answers

How to send a csv file through xhrPost()?

Currently, my form element looks like below:
But instead of giving the action, enctype and method on the , I want to send…
PPH
  • 31
  • 5
1
vote
1 answer

dojo.xhrGet fetch data from a file with a relative path

I have 3 files under my application folder - Index.html, Main.js, and state.json. The following javascript codes are from the Main.js. What is correct url format to fetch data from the state.json? Apparently url: '/state.json' didn't work.…
Alex W.
  • 546
  • 1
  • 7
  • 22
0
votes
1 answer

How to get the response headers in dojo/store/JsonRest?

I’m using dojo/store/JsonRest to fetch for some data. But I also need the response headers. How can I access them? this.transport = new JsonRest({ target: "my/target" }); this.transport.query({}).then(function(resp) { debugger; // <- I want to…
chitzui
  • 3,778
  • 4
  • 28
  • 38
0
votes
0 answers

How do I make a request using dojo.xhrGet() with Basic Authentication?

I'm trying to make a dojo xhrGet request using basic authentication but I keep getting 403 forbidden error. I can make the request with curl from the command line, so I know my credentials are valid. When I check the request headers, the…
roms
  • 1,511
  • 1
  • 11
  • 12
0
votes
1 answer

dojo/request/xhr text charset

I'm having troubles getting the correct encoding for a text file with xhr. xhr(content.getContentUrl(), { handleAs: "text", headers: { 'Content-Type': 'text/plain; charset=iso-8859-1' } }).then(function (data) { …
0
votes
0 answers

how to use dojo.all in case of loops and also requested calls methods expects callback function in their signature

All in my below scenrio, currentroles = [role1, role2]; Currently, the code is like below. (Currently they are independent async xhr…
0
votes
0 answers

xhrPost seems to be modifying the URL resulting in either 404 or 405?

xhrPost seems to be modifying the URL resulting in either 404 or 405. This is from a custom widget and attempting to go to a REST service on a WebSphere Liberty server. The rest service responds correctly when using RESTClient and building the…
Jay Witherspoon
  • 165
  • 1
  • 11
-1
votes
1 answer

dojo xhr request new syntax doesn't load data as expected

Like the title says I am using the new dojo syntax for the dojo/request/xhr, but this doesn't seem to work and throws an error while loading data while the old syntax with the same url gives the wanted result. This is the current syntax which…
cнŝdk
  • 31,391
  • 7
  • 56
  • 78