package com.yem.wm.syn.utils;

import kd.bos.exception.KDBizException;
import kd.bos.sdk.util.KHttpClientUtils;

import java.io.IOException;
import java.util.HashMap;

public class HttpClient {
    /**
     *
     * @param url
     * @param json
     * @return
     */
    public static String post(String url,String json) {

        HashMap header = new HashMap();
        header.put("Content-Type","application/json; charset=UTF-8");
        String request = null;
        try {
            //推送消息
            request = KHttpClientUtils.postjson(url, header, json);
        }catch (Exception e){
            throw new KDBizException("调用CMMP接口异常:"+e.getMessage());
        }
        return request;
    }
}
