Advertisement
Multivit4min

Untitled

Mar 21st, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function request(playlist) {
  2.         var data = JSON.stringify({
  3.             'playlist': playlist,
  4.             'instanceid': 1,
  5.             'user': config.loginUsername,
  6.             'pass': config.loginPassword,
  7.             'botIp': config.botIp,
  8.             'botPort': config.botPort,
  9.             'design': designs[config.avatarDesign]
  10.         });
  11.         sinusbot.http({
  12.             'method': 'POST',
  13.             'url': avatarUrl,
  14.             'body': data,
  15.             'headers': {
  16.                 'Content-Type': 'application/json; charset=utf-8',
  17.                 'Content-Length': lengthInUtf8Bytes(data)
  18.             },
  19.             'timeout': 4000
  20.         }, function(error, response) {
  21.             return {'error': error, 'response': response.data};
  22.         });
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement