Guest User

Untitled

a guest
Jul 10th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. def http = new BasicHttp()
  2. def postHeader = ['Content-Type': 'application/x-www-form-urlencoded']
  3. def postBody = [
  4. grant_type: 'password',
  5. client_id: consumer_key,
  6. client_secret: consumer_secret,
  7. username: auth_username,
  8. password: auth_password
  9. ]
  10. http.headers = postHeader;
  11. http.verb ="POST";
  12. http.payload = JsonOutput.toJson(postBody);
  13. http.url =sf_login_domain;
  14. def res = http.send();
Add Comment
Please, Sign In to add comment