io.gitee.huangguiming.Imcode.utils.RequestExecutor Maven / Gradle / Ivy
package io.gitee.huangguiming.Imcode.utils;
import io.gitee.huangguiming.Imcode.exception.IMException;
import java.io.IOException;
public interface RequestExecutor {
/**
* 执行http请求.
*
* @param uri uri
* @param data 数据
* @return 响应结果
*
* @throws IOException io异常
*/
T execute(String uri, E data) throws IOException, IMException;
/**
* 执行http请求.
*
* @param uri uri
* @param data 数据
* @param handler http响应处理器
* @throws IOException io异常
*/
void execute(String uri, E data, ResponseHandler handler) throws IOException, IMException;
}