## 类的使用
org.redkale.net.http.HttpResponse

- 使用HttpResponse的程序包
  程序包 | 说明
  --- | ---
  org.redkale.boot | 提供Redkale服务器的启动、初始化和加载功能
  org.redkale.net.http | HTTP协议包,提供HTTP协议服务器

- - ### org.redkale.boot中HttpResponse的使用

    参数类型为HttpResponse的org.redkale.boot中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | ApiDocs.`authenticate(int moduleid, int actionid, HttpRequest request, HttpResponse response)`

  - ### org.redkale.net.http中HttpResponse的使用

    返回HttpResponse的org.redkale.net.http中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `HttpResponse` | HttpResponse.`addCookie(java.util.Collection<java.net.HttpCookie> cookies)` 增加Cookie值
    `HttpResponse` | HttpResponse.`addCookie(java.net.HttpCookie... cookies)` 增加Cookie值
    `HttpResponse` | HttpResponse.`addHeader(java.util.Map<java.lang.String,?> map)` 添加Header值
    `HttpResponse` | HttpResponse.`addHeader(java.lang.String name, java.lang.Object value)` 添加Header值
    `HttpResponse` | HttpResponse.`setContentLength(long contentLength)` 设置内容长度
    `HttpResponse` | HttpResponse.`setContentType(java.lang.String contentType)` 设置 ContentType
    `HttpResponse` | HttpResponse.`setHeader(java.lang.String name, java.lang.Object value)` 设置Header值
    `HttpResponse` | HttpResponse.`setStatus(int status)` 设置状态码
    `HttpResponse` | HttpResponse.`skipHeader()` 跳过header的输出 通常应用场景是，调用者的输出内容里已经包含了HTTP的响应头信息，因此需要调用此方法避免重复输出HTTP响应头信息。

    参数类型为HttpResponse的org.redkale.net.http中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | DefaultRestServlet.`authenticate(int moduleid, int actionid, HttpRequest request, HttpResponse response)`
    `abstract boolean` | HttpBaseServlet.`authenticate(int moduleid, int actionid, HttpRequest request, HttpResponse response)`
    `void` | HttpBaseServlet.`execute(HttpRequest request, HttpResponse response)`
    `void` | HttpPrepareServlet.`execute(HttpRequest request, HttpResponse response)`
    `void` | HttpResourceServlet.`execute(HttpRequest request, HttpResponse response)`
    `void` | WebSocketServlet.`execute(HttpRequest request, HttpResponse response)`
    `java.nio.ByteBuffer[]` | HttpResponse.BufferHandler.`execute(HttpResponse response, java.nio.ByteBuffer[] buffers)`
    `protected void` | RestHttpServlet.`finishJson(HttpResponse response, RestOutput output)`
    `protected void` | RestHttpServlet.`finishJsResult(HttpResponse response, java.lang.String var, RestOutput output)`
    `boolean` | HttpBaseServlet.`preExecute(HttpRequest request, HttpResponse response)`