高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Author: Bubba Li
 * Created Date: 01/25/2022
 * Purpose: Utility class for AWS Servicw
 * Test Class: AWSServiceTool
 * History: 
 *      01/25/2022 - Bubba Li - Initial Code.
 * 
 * */
public without sharing class AWSServiceTool {
    public static String getAWSToken(){
        String app_id = '6LzizcRf7h8yLx28';
        String app_secret = 'UkLohQcHNjg164SdRc7gnS4rgu4d7FjINM3mtzRbyTS6IrUP5V';
        String url = 'https://52.83.101.205/api/token/getToken?app_id=' + app_id + '&app_secret=' + app_secret;
        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setMethod('GET');
        Http h = new Http();
        HttpResponse res = h.send(req);
        return res.getBody();
    }
}