Opened 9 years ago
Closed 5 years ago
#15377 closed defect (patchwelcome)
dojo/request, nodejs and handleAs "xml" not working
Reported by: | Kitson Kelly | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | undecided | Milestone: | 1.11 |
Component: | IO | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
It appears that dojo/request + node + handleAs "xml" is not working.
I have attached a example file, that if you run under node, returns the data as a string, instead of a parsed XML document:
node lib/dojo/dojo.js load=test
The example test is the following:
require(["dojo/request", "dojo/json"], function(request, JSON){ request.get("http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=kitsonk&api_key=b25b959554ed76058ac220b7b2e0a026", { handleAs: "xml" }).then(function(response){ console.log(JSON.stringify(response.data)); }, function(err){ console.log(err); }); });
Attachments (1)
Change History (3)
Changed 9 years ago by
comment:1 Changed 9 years ago by
Given that Node does not ship with an XML parser I'm not sure this should or even could be fixed. Instead can we throw an exception when handleAs: "xml"
is used?
comment:2 Changed 5 years ago by
Milestone: | tbd → 1.11 |
---|---|
Resolution: | → patchwelcome |
Status: | new → closed |
We would accept a patch, but otherwise this won't get fixed as it's a minor issue.
Note: See
TracTickets for help on using
tickets.
Example Test