// 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;
//     }
// }


import android.text.TextUtils;
import com.jiang.android.architecture.okhttp.Param;
import java.util.Map;
import java.util.Set;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
/**
 * created by jiang, 15/10/19
 * Copyright (c) 2015, jyuesong@gmail.com All Rights Reserved.
 * *                #                                                   #
 * #                       _oo0oo_                     #
 * #                      o8888888o                    #
 * #                      88" . "88                    #
 * #                      (| -_- |)                    #
 * #                      0\  =  /0                    #
 * #                    ___/`---'\___                  #
 * #                  .' \\|     |# '.                 #
 * #                 / \\|||  :  |||# \                #
 * #                / _||||| -:- |||||- \              #
 * #               |   | \\\  -  #/ |   |              #
 * #               | \_|  ''\---/''  |_/ |             #
 * #               \  .-\__  '-'  ___/-. /             #
 * #             ___'. .'  /--.--\  `. .'___           #
 * #          ."" '<  `.___\_<|>_/___.' >' "".         #
 * #         | | :  `- \`.;`\ _ /`;.`/ - ` : | |       #
 * #         \  \ `_.   \_ __\ /__ _/   .-` /  /       #
 * #     =====`-.____`.___ \_____/___.-`___.-'=====    #
 * #                       `=---='                     #
 * #     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   #
 * #                                                   #
 * #               佛祖保佑         永无BUG              #
 * #                                                   #
 */
package com.jiang.android.architecture.okhttp.utils;





/**
 * 相关网络请求的工具类
 * Created by jiang on 15/10/16.
 */
public class HttpUtils {

    public static String parseParams2String(Map<String, String> param) {
        if (param == null || param.size() == 0)
            return "";

        StringBuffer buffer = new StringBuffer();
        Set<Map.Entry<String, String>> entrySet = param.entrySet();
        for (Map.Entry<String, String> entry : entrySet) {
// 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/HttpUtils.java
import android.text.TextUtils;
import com.jiang.android.architecture.okhttp.Param;
import java.util.Map;
import java.util.Set;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

/**
 * created by jiang, 15/10/19
 * Copyright (c) 2015, jyuesong@gmail.com All Rights Reserved.
 * *                #                                                   #
 * #                       _oo0oo_                     #
 * #                      o8888888o                    #
 * #                      88" . "88                    #
 * #                      (| -_- |)                    #
 * #                      0\  =  /0                    #
 * #                    ___/`---'\___                  #
 * #                  .' \\|     |# '.                 #
 * #                 / \\|||  :  |||# \                #
 * #                / _||||| -:- |||||- \              #
 * #               |   | \\\  -  #/ |   |              #
 * #               | \_|  ''\---/''  |_/ |             #
 * #               \  .-\__  '-'  ___/-. /             #
 * #             ___'. .'  /--.--\  `. .'___           #
 * #          ."" '<  `.___\_<|>_/___.' >' "".         #
 * #         | | :  `- \`.;`\ _ /`;.`/ - ` : | |       #
 * #         \  \ `_.   \_ __\ /__ _/   .-` /  /       #
 * #     =====`-.____`.___ \_____/___.-`___.-'=====    #
 * #                       `=---='                     #
 * #     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   #
 * #                                                   #
 * #               佛祖保佑         永无BUG              #
 * #                                                   #
 */
package com.jiang.android.architecture.okhttp.utils;





/**
 * 相关网络请求的工具类
 * Created by jiang on 15/10/16.
 */
public class HttpUtils {

    public static String parseParams2String(Map<String, String> param) {
        if (param == null || param.size() == 0)
            return "";

        StringBuffer buffer = new StringBuffer();
        Set<Map.Entry<String, String>> entrySet = param.entrySet();
        for (Map.Entry<String, String> entry : entrySet) {
            Param par = new Param(entry.getKey(), entry.getValue());