forked from vector4wang/spring-boot-quick
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResponse.java
More file actions
89 lines (69 loc) · 1.8 KB
/
Response.java
File metadata and controls
89 lines (69 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package com.quick.api.utils;
import java.util.HashMap;
import java.util.Map;
/**
* @Author: wangxc
* @GitHub: https://github.com/vector4wang
* @CSDN: http://blog.csdn.net/qqhjqs?viewmode=contents
* @BLOG: http://vector4wang.tk
* @wxid: BMHJQS
*/
public class Response {
private int statusCode;
private String contentType;
private String requestId;
private String errorMessage;
private Map<String, String> headers;
private String body;
public Response() {
}
public int getStatusCode() {
return statusCode;
}
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
public String getContentType() {
return contentType;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public Map<String, String> getHeaders() {
return headers;
}
public String getHeader(String key) {
if (null != headers) {
return headers.get(key);
} else {
return null;
}
}
public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}
public void setHeader(String key, String value) {
if (null == this.headers) {
this.headers = new HashMap<String, String>();
}
this.headers.put(key, value);
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
}