Browse Source

httpGet: accept 2nd parameter options

master
parent
commit
319720bc7c
  1. 2
      src/httpGet.js
  2. 2
      src/wikidata.js

2
src/httpGet.js

@ -1,4 +1,4 @@
function httpGet (url, callback) {
function httpGet (url, options, callback) {
var xhr = new XMLHttpRequest()
xhr.open('get', url, true)
xhr.responseType = 'text'

2
src/wikidata.js

@ -13,7 +13,7 @@ function wikidataLoad (id, callback) {
}
loadClash[id] = []
httpGet('https://www.wikidata.org/wiki/Special:EntityData/' + id + '.json', function (err, result) {
httpGet('https://www.wikidata.org/wiki/Special:EntityData/' + id + '.json', {}, function (err, result) {
if (err) {
return callback(err, null)
}

Loading…
Cancel
Save