Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def http = new BasicHttp()
- def postHeader = ['Content-Type': 'application/x-www-form-urlencoded']
- def postBody = [
- grant_type: 'password',
- client_id: consumer_key,
- client_secret: consumer_secret,
- username: auth_username,
- password: auth_password
- ]
- http.headers = postHeader;
- http.verb ="POST";
- http.payload = JsonOutput.toJson(postBody);
- http.url =sf_login_domain;
- def res = http.send();
Add Comment
Please, Sign In to add comment