You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.3 KiB
53 lines
1.3 KiB
3 years ago
|
package com.eco.plugin.xxxx.oats.handler;
|
||
|
|
||
|
import com.eco.plugin.xxxx.oats.config.PluginSimpleConfig;
|
||
|
import com.eco.plugin.xxxx.oats.utils.HttpUtils;
|
||
|
import com.eco.plugin.xxxx.oats.utils.ResponseUtils;
|
||
|
import com.eco.plugin.xxxx.oats.utils.Utils;
|
||
|
import com.fr.decision.fun.impl.BaseHttpHandler;
|
||
|
import com.fr.json.JSONObject;
|
||
|
import com.fr.plugin.transform.FunctionRecorder;
|
||
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
@FunctionRecorder
|
||
|
public class ProcessOverRequestByJson extends BaseHttpHandler {
|
||
|
|
||
|
|
||
|
public ProcessOverRequestByJson() {
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public RequestMethod getMethod() {
|
||
|
return RequestMethod.POST;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getPath() {
|
||
|
return "/ofs/processOverRequestByJson";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean isPublic() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception {
|
||
|
JSONObject json = Utils.getRequestBody(req);
|
||
|
|
||
|
String url = PluginSimpleConfig.getInstance().getProcessOverRequestByJson();
|
||
|
|
||
|
String result = HttpUtils.HttpPostJson(url,json.toString(),null);
|
||
|
|
||
|
ResponseUtils.response(res,new JSONObject(result));
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|