类 HttpResponse

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

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

    • HttpResponse

      public HttpResponse(int status, String desc, String version, Map<String,List<String>> headers, byte[] body)
      Constructs a new HttpResponse.
      参数:
      status - the status for the response
      desc - the desc for the response
      version - the version for the response
      headers - the headers for the response
      body - the body of the response
  • 方法详细资料

    • getStatus

      public int getStatus()
      Returns the status of the response.
      返回:
      the status of the response
    • getDesc

      public String getDesc()
      Returns the desc of the response.
      返回:
      the desc of the response
    • getVersion

      public String getVersion()
      Returns the version of the response.
      返回:
      the version of the response
    • getHeaders

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

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

      public String prettyString()
      Returns the response as a pretty string.
      返回:
      the response as a pretty string