Package org.iplass.mtp.webhook
Class WebhookResponse
java.lang.Object
org.iplass.mtp.webhook.WebhookResponse
The class representing the response of a dispatched Webhook.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the encode type of the response body.Get the content type of the response body.Get the response headers.The reason phrase of the response.Get the content of the response body.int
Get the status code.void
setContentEncoding
(String contentEncoding) Set the encode type of the response body.void
setContentType
(String contentType) Set the content type of the response body.void
setHeaders
(List<WebhookHeader> headers) Set the response headers.void
setReasonPhrase
(String reasonPhrase) Set the reason phrase of the response.void
setResponseBody
(String responseBody) Set the content of the response body.void
setStatusCode
(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
The reason phrase of the response. Example: the [ok] part of a typical response 200 ok. -
setReasonPhrase
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
Get the content type of the response body. -
setContentType
Set the content type of the response body.- Parameters:
contentType
- Type
-
getResponseBody
Get the content of the response body. -
setResponseBody
Set the content of the response body.- Parameters:
responseBody
- contents
-
getContentEncoding
Get the encode type of the response body. -
setContentEncoding
Set the encode type of the response body.- Parameters:
contentEncoding
- Encode type name
-