admin
2021-02-03 1981dee5aec45793d3c4ebdbc4e637528c71b3c5
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
package com.lcjian.library.okhttp.builder;
 
 
import com.lcjian.library.okhttp.request.OtherRequest;
import com.lcjian.library.okhttp.request.RequestCall;
 
import okhttp3.RequestBody;
 
/**
 * DELETE、PUT、PATCH等其他方法
 */
public class OtherRequestBuilder extends OkHttpRequestBuilder<OtherRequestBuilder>
{
    private RequestBody requestBody;
    private String method;
    private String content;
 
    public OtherRequestBuilder(String method)
    {
        this.method = method;
    }
 
    @Override
    public RequestCall build()
    {
        return new OtherRequest(requestBody, content, method, url, tag, params, headers,id).build();
    }
 
    public OtherRequestBuilder requestBody(RequestBody requestBody)
    {
        this.requestBody = requestBody;
        return this;
    }
 
    public OtherRequestBuilder requestBody(String content)
    {
        this.content = content;
        return this;
    }
 
 
}