xuxiuxi
2017-03-29 386839ed53a6ede6994ecf34c800eebf3e3c1ef9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package cn.com.basic.face.util;
 
 
import com.lzy.okhttputils.OkHttpUtils;
import com.lzy.okhttputils.callback.FileCallback;
import com.lzy.okhttputils.callback.StringCallback;
 
import java.io.File;
 
import okhttp3.Call;
import okhttp3.Response;
 
/**
 * Created by Sinoe on 2017/3/6.
 */
 
public class GetNetResultJson {
    public String getResultJson(String url){
        OkHttpUtils.post(url)
                .tag(this)
                .params("","")
                .execute(new StringCallback() {
                    @Override
                    public void onSuccess(String s, Call call, Response response) {
 
                    }
                });
        OkHttpUtils.post(url)
                .tag(this)
                .params("","")
                .execute(new FileCallback() {
                    @Override
                    public void onSuccess(File file, Call call, Response response) {
 
                    }
                });
        return null;
    }
 
    public static String post(String url){
        String fullUrl = UrlUtil.BaseUrl+url;
        OkHttpUtils.post(fullUrl)
                .params("","")
                .execute(new StringCallback() {
                    @Override
                    public void onSuccess(String s, Call call, Response response) {
 
                    }
                });
        return null;
    }
 
}