Package com.slack.api.bolt.response
Class Response
- java.lang.Object
-
- com.slack.api.bolt.response.Response
-
public class Response extends Object
HTTP response to the Slack API server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Response.ResponseBuilder
-
Field Summary
Fields Modifier and Type Field Description static String
CONTENT_TYPE_APPLICATION_JSON
Deprecated.static String
CONTENT_TYPE_APPLICATION_JSON_UTF8
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Response.ResponseBuilder
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
static Response
error(Integer statusCode)
String
getBody()
String
getContentType()
Map<String,List<String>>
getHeaders()
Integer
getStatusCode()
int
hashCode()
static Response
json(Integer statusCode, Object body)
static Response
ok()
static Response
ok(Object body)
void
setBody(String body)
void
setContentType(String contentType)
void
setHeaders(Map<String,List<String>> headers)
void
setStatusCode(Integer statusCode)
String
toString()
-
-
-
Field Detail
-
CONTENT_TYPE_APPLICATION_JSON
@Deprecated public static final String CONTENT_TYPE_APPLICATION_JSON
Deprecated.This is no longer used. Use CONTENT_TYPE_APPLICATION_JSON_UTF8 instead.- See Also:
- Constant Field Values
-
CONTENT_TYPE_APPLICATION_JSON_UTF8
public static final String CONTENT_TYPE_APPLICATION_JSON_UTF8
- See Also:
- Constant Field Values
-
-
Method Detail
-
ok
public static Response ok()
-
builder
public static Response.ResponseBuilder builder()
-
getStatusCode
public Integer getStatusCode()
-
getContentType
public String getContentType()
-
getBody
public String getBody()
-
setStatusCode
public void setStatusCode(Integer statusCode)
-
setContentType
public void setContentType(String contentType)
-
setBody
public void setBody(String body)
-
canEqual
protected boolean canEqual(Object other)
-
-