Created
March 14, 2015 17:38
-
-
Save ippa/1ce197955a76e2a1a641 to your computer and use it in GitHub Desktop.
access platsbanken api from nodejs/iojs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* on cmdline 'npm install superagent' | |
*/ | |
var superagent = require("superagent"); | |
var url = "http://api.arbetsformedlingen.se/platsannons/soklista/kommuner?lanid=10" | |
superagent.get(url) | |
.set("Accept", "application/json") | |
.set("Accept-Language", "sv-SE,sv") | |
.end( function(err, res) { | |
if(res.ok) { | |
console.log(res.text); | |
} | |
else { | |
console.log("Err: " + err); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment