Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var login = "mylogin";
- var password = "mypassword";
- (async function getAllUserByProject(login, password, project) {
- var url = ``https://mycompany.myjetbrains.com/hub/api/rest/users?`;
- return new Promise((done, fail)=> {
- request.get({
- url, auth: {user: login, pass: password, sendImmediately: true}
- }, (error, body, result)=> {
- if (error || !result) {
- return fail({
- error: JSON.parse(error), result: result ? JSON.parse(result) : null
- })
- }
- console.log(result)
- done(JSON.parse(result));
- })
- })
- }
- )(login, password, project);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement