fix(OA接口):增加esb-apikey
This commit is contained in:
parent
513b1ab882
commit
d5988f3504
@ -17,6 +17,10 @@ public class OAUtil {
|
||||
|
||||
private static final String WbpUrl = "https://agw.esb.nit.pub/oa/pip";
|
||||
|
||||
private static final String apikey = "hWS3L96a0h4NKCAjN9hG1OmOeEIsxCTz";
|
||||
|
||||
private static final String env = "DEV";
|
||||
|
||||
public static String appendHead(String jsonStr) {
|
||||
JSONObject allJson = new JSONObject();
|
||||
allJson.put("API_METHOD", "POST");
|
||||
@ -46,6 +50,8 @@ public class OAUtil {
|
||||
connection.setRequestMethod("POST");
|
||||
connection.setDoOutput(true);
|
||||
connection.setRequestProperty("Content-Type", "application/json"); // 设置内容类型
|
||||
connection.setRequestProperty("x-esb-apikey", apikey);
|
||||
connection.setRequestProperty("x-esb-env", env);
|
||||
|
||||
// 发送请求
|
||||
try (OutputStream os = connection.getOutputStream()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user