Class HttpResponse

java.lang.Object
org.apache.apisix.plugin.runner.HttpResponse
All Implemented Interfaces:
A6Response

public class HttpResponse extends Object implements A6Response
table Resp { id:uint32; action:Action; }
  • Constructor Details

    • HttpResponse

      public HttpResponse(long requestId)
  • Method Details

    • getRequestId

      public long getRequestId()
    • setReqHeader

      public void setReqHeader(String headerKey, String headerValue)
    • setArg

      public void setArg(String argKey, String argValue)
      Sets arg.
      Parameters:
      argKey - the arg key
      argValue - the arg value
    • setPath

      public void setPath(String path)
      Sets path.
      Parameters:
      path - the path
    • setHeader

      public void setHeader(String headerKey, String headerValue)
      Sets header.
      Parameters:
      headerKey - the header key
      headerValue - the header value
    • setBody

      public void setBody(String body)
      Sets body.
      Parameters:
      body - the body(string)
    • setStatusCode

      public void setStatusCode(int statusCode)
      Sets status code.
      Parameters:
      statusCode - the status code
    • encode

      public ByteBuffer encode()
      Specified by:
      encode in interface A6Response
    • getType

      public byte getType()
      Specified by:
      getType in interface A6Response