Package com.slack.api.bolt.request
Class Request<CTX extends Context>
- java.lang.Object
-
- com.slack.api.bolt.request.Request<CTX>
-
- Type Parameters:
CTX
- context
- Direct Known Subclasses:
AttachmentActionRequest
,BlockActionRequest
,BlockSuggestionRequest
,DialogCancellationRequest
,DialogSubmissionRequest
,DialogSuggestionRequest
,EventRequest
,GlobalShortcutRequest
,MessageShortcutRequest
,OAuthCallbackRequest
,OAuthStartRequest
,SlashCommandRequest
,SSLCheckRequest
,UrlVerificationRequest
,ViewClosedRequest
,ViewSubmissionRequest
,WorkflowStepEditRequest
,WorkflowStepExecuteRequest
,WorkflowStepSaveRequest
public abstract class Request<CTX extends Context> extends Object
Http Request from the Slack API server.
-
-
Constructor Summary
Constructors Constructor Description Request()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getClientIpAddress()
abstract CTX
getContext()
The context behind this request.abstract RequestHeaders
getHeaders()
Map<String,List<String>>
getQueryString()
abstract String
getRequestBodyAsString()
abstract RequestType
getRequestType()
abstract String
getResponseUrl()
boolean
isSocketMode()
boolean
isValid(SlackSignature.Verifier verifier)
Verifies if the signature is valid.boolean
isValid(SlackSignature.Verifier verifier, long nowInMillis)
Verifies if the signature is valid.void
setClientIpAddress(String clientIpAddress)
void
setSocketMode(boolean socketMode)
String
toString()
void
updateContext(AppConfig config)
Set the sufficient information to the underlying context.
-
-
-
Method Detail
-
getClientIpAddress
public String getClientIpAddress()
-
setClientIpAddress
public void setClientIpAddress(String clientIpAddress)
-
getContext
public abstract CTX getContext()
The context behind this request.
-
updateContext
public void updateContext(AppConfig config)
Set the sufficient information to the underlying context.
-
getRequestType
public abstract RequestType getRequestType()
-
getRequestBodyAsString
public abstract String getRequestBodyAsString()
-
getHeaders
public abstract RequestHeaders getHeaders()
-
getResponseUrl
public abstract String getResponseUrl()
-
isValid
public boolean isValid(SlackSignature.Verifier verifier)
Verifies if the signature is valid.- Parameters:
verifier
- the verifier- Returns:
- true if valid
-
isValid
public boolean isValid(SlackSignature.Verifier verifier, long nowInMillis)
Verifies if the signature is valid.- Parameters:
verifier
- the verifiernowInMillis
- current timestamp- Returns:
- true if valid
-
isSocketMode
public boolean isSocketMode()
-
setSocketMode
public void setSocketMode(boolean socketMode)
-
-