// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/Param.java
// public class Param {
//     public Param(String key,String value) {
//         this.key = key;
//         this.value = value;
//     }
// 
//     public String key;
//     public String value;
// 
// 
//     @Override
//     public String toString() {
//         return key + "=" + value;
//     }
// }
// 
// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/utils/HeaderUtils.java
// public class HeaderUtils {
// 
//     public static List<Param> validateHeaders(Map<String, String> header) {
//         if (header == null || header.size() == 0)
//             return null;
//         List<Param> results = new LinkedList<>();
//         Set<Map.Entry<String, String>> entrySet = header.entrySet();
//         for (Map.Entry<String, String> entry : entrySet) {
//             Param param = new Param(entry.getKey(), entry.getValue());
//             results.add(param);
//         }
//         return results;
// 
// 
//     }
// }


import com.jiang.android.architecture.okhttp.Param;
import com.jiang.android.architecture.okhttp.utils.HeaderUtils;
import java.util.List;
import java.util.Map;
import okhttp3.Request;
import okhttp3.RequestBody;
package com.jiang.android.architecture.okhttp.request;





/**
 * Created by jiang on 16/7/28.
 */
public class UploadRequest {

    public static Request buildPostRequest(String url, Map<String, String> headers, Object tab, RequestBody requestBody) {

        Request.Builder reqBuilder = new Request.Builder();
        reqBuilder.post(requestBody).url(url);
        reqBuilder.tag(tab);

        List<Param> valdatedHeaders = HeaderUtils.validateHeaders(headers);
        if (valdatedHeaders != null && valdatedHeaders.size() > 0) {
            for (int i = 0; i < valdatedHeaders.size(); i++) {
// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/Param.java
// public class Param {
//     public Param(String key,String value) {
//         this.key = key;
//         this.value = value;
//     }
// 
//     public String key;
//     public String value;
// 
// 
//     @Override
//     public String toString() {
//         return key + "=" + value;
//     }
// }
// 
// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/utils/HeaderUtils.java
// public class HeaderUtils {
// 
//     public static List<Param> validateHeaders(Map<String, String> header) {
//         if (header == null || header.size() == 0)
//             return null;
//         List<Param> results = new LinkedList<>();
//         Set<Map.Entry<String, String>> entrySet = header.entrySet();
//         for (Map.Entry<String, String> entry : entrySet) {
//             Param param = new Param(entry.getKey(), entry.getValue());
//             results.add(param);
//         }
//         return results;
// 
// 
//     }
// }


// Path: architecture/src/main/java/com/jiang/android/architecture/okhttp/request/UploadRequest.java
import com.jiang.android.architecture.okhttp.Param;
import com.jiang.android.architecture.okhttp.utils.HeaderUtils;
import java.util.List;
import java.util.Map;
import okhttp3.Request;
import okhttp3.RequestBody;

package com.jiang.android.architecture.okhttp.request;





/**
 * Created by jiang on 16/7/28.
 */
public class UploadRequest {

    public static Request buildPostRequest(String url, Map<String, String> headers, Object tab, RequestBody requestBody) {

        Request.Builder reqBuilder = new Request.Builder();
        reqBuilder.post(requestBody).url(url);
        reqBuilder.tag(tab);

        List<Param> valdatedHeaders = HeaderUtils.validateHeaders(headers);
        if (valdatedHeaders != null && valdatedHeaders.size() > 0) {
            for (int i = 0; i < valdatedHeaders.size(); i++) {
                Param param = valdatedHeaders.get(i);