package com.huimv.admin.analyse;

import com.huimv.admin.utils.HttpClient;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;

import javax.servlet.http.HttpUtils;
import java.util.HashMap;

/**
 * @Project : huimv.shiwan
 * @Package : com.huimv.admin.analyse
 * @Description : TODO
 * @Author : yuxuexuan
 * @Create : 2020/12/26 0026 19:53
 **/

public class AITest {
    public static void main(String[] args) throws Exception {

        String access_token_url = "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials" +
                "&client_id=" + APIConstants.API_KEY
                + "&client_secret=" + APIConstants.SECRET_KEY;

        HttpClient httpClient = new HttpClient(access_token_url);
        httpClient.setHttps(false);
        httpClient.get();

        String content = httpClient.getContent();
        System.out.println(content);

    }
}
