Helius
2021-01-27 2f6670dc8a71ec0eb2980408d558f2c3d6ddce2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.xcong.excoin.utils.api.response;
 
 
import com.xcong.excoin.utils.api.ApiException;
 
public class ApiResponse<T> {
 
    public String status;
    public String errCode;
    public String errMsg;
    public T data;
 
    public T checkAndReturn() {
        if ("ok".equals(status)) {
            return data;
        }
        throw new ApiException(errCode, errMsg);
    }
}