package top.octopusyan.http.api;

import lombok.Data;
import top.octopusyan.http.config.BodyType;

/**
 * @author : octopus yan
 * @email : octopus_yan@foxmail.com
 * @description : 请求基类
 * @create : 2022-4-1 16:07
 */
@Data
public class RequestApi<Param, Result> {

    /** 接口地址 <p> 必须以<code>/<code/> 开头*/
    String api;

    /** 请求方式 */
    String method;

    /** 参数提交方式 <p> 默认JSON*/
    BodyType bodyType = BodyType.JSON;

    public RequestApi(String api, String method) {
        this.api = api;
        this.method = method;
    }

    public RequestApi(String api, String method, BodyType bodyType) {
        this.api = api;
        this.method = method;
        this.bodyType = bodyType;
    }
}
