类 HttpRequest

java.lang.Object
io.github.wooenrico.http.common.HttpRequest

public class HttpRequest extends Object
HttpRequest Object
  • 构造器详细资料

    • HttpRequest

      public HttpRequest(String url, Method method, Map<String,String> headers, byte[] body)
      Constructs a new HttpRequest.
      参数:
      url - the URL for the request
      method - the HTTP method for the request
      headers - the headers for the request
      body - the body of the request
  • 方法详细资料

    • getUrl

      public String getUrl()
      Returns the URL of the request.
      返回:
      the URL of the request
    • getMethod

      public Method getMethod()
      Returns the HTTP method of the request.
      返回:
      the HTTP method of the request
    • getHeaders

      public Map<String,String> getHeaders()
      Returns the headers of the request.
      返回:
      the headers of the request
    • getBody

      public byte[] getBody()
      Returns the body of the request.
      返回:
      the body of the request
    • toString

      public String toString()
      Returns a string representation of the HTTP request.
      覆盖:
      toString 在类中 Object
      返回:
      a string representation of the HTTP request
    • prettyString

      public String prettyString()
      Returns a pretty string representation of the HTTP request.
      返回:
      a pretty string representation of the HTTP request