Package org.apache.apisix.plugin.runner
Class HttpResponse
java.lang.Object
org.apache.apisix.plugin.runner.HttpResponse
- All Implemented Interfaces:
A6Response
table Resp {
id:uint32;
action:Action;
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.apisix.plugin.runner.A6Response
A6Response.ActionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode()longbytegetType()voidSets arg.voidSets body.voidSets header.voidSets path.voidsetReqHeader(String headerKey, String headerValue) voidsetStatusCode(int statusCode) Sets status code.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.apisix.plugin.runner.A6Response
getErrResponse
-
Constructor Details
-
HttpResponse
public HttpResponse(long requestId)
-
-
Method Details
-
getRequestId
public long getRequestId() -
setReqHeader
-
setArg
Sets arg.- Parameters:
argKey- the arg keyargValue- the arg value
-
setPath
Sets path.- Parameters:
path- the path
-
setHeader
Sets header.- Parameters:
headerKey- the header keyheaderValue- the header value
-
setBody
Sets body.- Parameters:
body- the body(string)
-
setStatusCode
public void setStatusCode(int statusCode) Sets status code.- Parameters:
statusCode- the status code
-
encode
- Specified by:
encodein interfaceA6Response
-
getType
public byte getType()- Specified by:
getTypein interfaceA6Response
-