Package org.iplass.mtp.webhook
Class WebhookResponse
java.lang.Object
org.iplass.mtp.webhook.WebhookResponse
public class WebhookResponse
extends java.lang.Object
The class representing the response of a dispatched Webhook.
-
Constructor Summary
Constructors Constructor Description WebhookResponse() -
Method Summary
Modifier and Type Method Description java.lang.StringgetContentEncoding()Get the encode type of the response body.java.lang.StringgetContentType()Get the content type of the response body.java.util.List<WebhookHeader>getHeaders()Get the response headers.java.lang.StringgetReasonPhrase()The reason phrase of the response.java.lang.StringgetResponseBody()Get the content of the response body.intgetStatusCode()Get the status code.voidsetContentEncoding(java.lang.String contentEncoding)Set the encode type of the response body.voidsetContentType(java.lang.String contentType)Set the content type of the response body.voidsetHeaders(java.util.List<WebhookHeader> headers)Set the response headers.voidsetReasonPhrase(java.lang.String reasonPhrase)Set the reason phrase of the response.voidsetResponseBody(java.lang.String responseBody)Set the content of the response body.voidsetStatusCode(int statusCode)Set the status code.
-
Constructor Details
-
WebhookResponse
public WebhookResponse()
-
-
Method Details
-
getStatusCode
public int getStatusCode()Get the status code. -
setStatusCode
public void setStatusCode(int statusCode)Set the status code.- Parameters:
statusCode- Enter the appropriate numbers(Such as 200)
-
getReasonPhrase
public java.lang.String getReasonPhrase()The reason phrase of the response. Example: the [ok] part of a typical response 200 ok. -
setReasonPhrase
public void setReasonPhrase(java.lang.String reasonPhrase)Set the reason phrase of the response.- Parameters:
reasonPhrase- reason phrase
-
getHeaders
Get the response headers. -
setHeaders
Set the response headers.- Parameters:
headers- List of WebhookHeader
-
getContentType
public java.lang.String getContentType()Get the content type of the response body. -
setContentType
public void setContentType(java.lang.String contentType)Set the content type of the response body.- Parameters:
contentType- Type
-
getResponseBody
public java.lang.String getResponseBody()Get the content of the response body. -
setResponseBody
public void setResponseBody(java.lang.String responseBody)Set the content of the response body.- Parameters:
responseBody- contents
-
getContentEncoding
public java.lang.String getContentEncoding()Get the encode type of the response body. -
setContentEncoding
public void setContentEncoding(java.lang.String contentEncoding)Set the encode type of the response body.- Parameters:
contentEncoding- Encode type name
-