Skip to content

Instantly share code, notes, and snippets.

@ssddi456
Last active May 16, 2018 00:48
Show Gist options
  • Save ssddi456/c2f10178c3573f37dc05 to your computer and use it in GitHub Desktop.
Save ssddi456/c2f10178c3573f37dc05 to your computer and use it in GitHub Desktop.
curl
var request = require('request');
var req = request
.post('https://api.github.com/authorizations',{
auth : {
username : 'ssddi456',
password : '',
'sendImmediately': true
},
headers : {
'User-Agent' : 'autho-robot'
}
});
req.write( JSON.stringify({"scopes":["gist"], "note": "SublimeText 2/3 Gist plugin"}));
req.pipe( process.stdout );
// curl -v -u ssddi456 -X POST https://api.github.com/authorizations --data "{\"scopes\":[\"gist\"], \"note\": \"SublimeText 2/3 Gist plugin\"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment