content: package com.docapis.core.http;
  
  import java.util.HashMap;
  import java.util.Map;
  
  /**
   * http request
   * <p>
   * licence Apache 2.0, from japidoc
   **/
  public class DHttpRequest {
  
      private String url;
      private boolean autoRedirect = true; //自动重定向
      private Map<String, String> params = new HashMap<>();
      private Map<String, String> headers;
  
      public String getUrl() {
          return url;
      }
  
      public void setUrl(String url) {
          this.url = url;
      }
  
      public Map<String, String> getParams() {
          return params;
      }
  
      public void setParams(Map<String, String> params) {
          this.params = params;
      }
  
      public Map<String, String> getHeaders() {
          return headers;
      }
  
      public void setHeaders(Map<String, String> headers) {
          this.headers = headers;
      }
  
      public void addParam(String name, String value) {
          params.put(name, value);
      }
  
      public boolean isAutoRedirect() {
          return autoRedirect;
      }
  
      public void setAutoRedirect(boolean autoRedirect) {
          this.autoRedirect = autoRedirect;
      }
  }
  