shz.spring.api.SpringApiRequest Maven / Gradle / Ivy
package shz.spring.api;
import com.alibaba.fastjson2.JSON;
import shz.core.Container;
import shz.core.net.api.AbstractApiRequest;
import shz.core.net.api.ApiResponse;
import java.util.Map;
public class SpringApiRequest extends AbstractApiRequest {
static {
Container.setLoadContainer(true);
}
@Override
protected byte[] body(Map dataMap) {
if (dataMap.isEmpty() || !config.getMethod().startsWith("P")) return null;
return JSON.toJSONBytes(dataMap);
}
@Override
protected R analysis(String response) {
return JSON.parseObject(response, rCls);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy