package com.common.lib_base.mvp;

import com.common.lib_base.common.http.manager.BaseApiService;
import com.google.gson.Gson;

import okhttp3.MediaType;
import okhttp3.RequestBody;

/**
 * Date: 2022/5/27 0027 10:24
 * Description:
 */
public class BaseModel<T> {

    public BaseApiService mApiService;

    public BaseModel(BaseApiService mApiService) {
        this.mApiService = mApiService;
    }

    public RequestBody createRequestBody(T t){
        RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(t));
        return body;
    }

}
