package com.oo.seex.netlibrary.net.response;

import java.util.HashMap;
import java.util.Map;

/**
 * 请求参数封装类
 */

public class Request {

    private Map<String, String> params = new HashMap<>();

    private  Map<String,String> headers = new HashMap<>();

    public Request(){
//        String userAgent = OOAgent.getUserAgent(ContextUtil.getAppContext());
//        headers.put("User-Agent",userAgent);
    }

    public void setParams(Map<String, String> map){
        this.params = map;
    }

    public void setHeaders(Map<String,String> map){
        this.headers = map;
    }

    public void addParams(String key,String value){
        if(params == null)params = new HashMap<>();
        this.params.put(key,value);
    }
    public void addHeaders(String key,String value){
        if(headers == null)headers = new HashMap<>();
        this.headers.put(key,value);
    }

    public Map<String, String> getParams() {
        return params;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }
}
