Last active
October 8, 2015 16:03
-
-
Save Gattermeier/c0bcac33df6994813be2 to your computer and use it in GitHub Desktop.
Apply via API
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
var request = require('request'); | |
var fs = require('fs'); | |
var data = { | |
first_name: "Matthias", | |
last_name: "Gattermeier", | |
email: "matthias.gattermeier@gmail.com", | |
position_id: "JS", | |
explanation: "I'm using the npm request module to send the request. Code here in the gist: https://gist.github.com/Gattermeier/c0bcac33df6994813be2", | |
projects: ["https://github.com/Gattermeier/nodejs-virus", "https://gist.github.com/Gattermeier/8c3f99ddeb75aa995c27", "https://chrome.google.com/webstore/detail/oxidizer/mjfdkgkfbceiiakhblgkcofjfoninggj", "http://www.gattermeier.net"], | |
source: "via Angel List", | |
resume: { | |
value: fs.createReadStream(__dirname + '/Resume-Matthias-Gattermeier.pdf'), | |
options: { | |
filename: 'Resume-Matthias-Gattermeier.pdf', | |
contentType: 'application/pdf' | |
} | |
} | |
} | |
request.post({ | |
url: 'https://api.perka.com/1/communication/job/apply', | |
data: data | |
}, function(err, response, body) { | |
if (err) { | |
return console.error('Request failed:', err); | |
} | |
console.log('Request successful:', body, response.statusCode); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment