@@ -0,0 +1,1575 @@
+package com.libvirus.okhttplib.request;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport okhttp3.FormBody;%0Aimport okhttp3.OkHttpClient;%0Aimport okhttp3.Request;%0A%0A/**%0A * Created by psu on 2016/4/16.%0A */%0Apublic class DeleteRequest extends OkHttpRequest %7B%0A%0A%09private Request.Builder builder;%0A%09private FormBody.Builder builderBody = new FormBody.Builder();%0A%0A%09public DeleteRequest() %7B%0A%09%09builder = new Request.Builder();%0A%09%7D%0A%0A%09public DeleteRequest setOkHttpClient(OkHttpClient p) %7B%0A%09%09mOkHttpClient = p;%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest host(String u) %7B%0A%09%09host = u;%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest url(String u) %7B%0A%09%09url = u;%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest tag(String u) %7B%0A%09%09builder.tag(u);%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest addHeader(String k, String v) %7B%0A%09%09builder.addHeader(k, v);%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest setHeader(Map%3CString, String%3E p) %7B%0A%09%09if (p != null) %7B%0A%09%09%09for (String key : p.keySet()) %7B%0A%09%09%09%09builder.header(key, p.get(key));%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest addParam(String k, String v) %7B%0A%09%09builderBody.add(k, v);%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest setParam(Map%3CString, String%3E p) %7B%0A%09%09if (p != null) %7B%0A%09%09%09for (String key : p.keySet()) %7B%0A%09%09%09%09builderBody.add(key, p.get(key));%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09return this;%0A%09%7D%0A%0A%09public DeleteRequest addParams(String key, List%3CString%3E p) %7B%0A%09%09if (p != null) %7B%0A%09%09%09for (String item : p) %7B%0A%09%09%09%09builderBody.add(key, item);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return this;%0A%09%7D%0A%0A%09@Override%0A%09protected void build() %7B%0A%09%09builder.url(host + url).delete(builderBody.build());%0A%09%09request = builder.build();%0A%09%7D%0A%7D%0A

add DeleteRequest