ad5081d3
孙向锦
初始化项目
|
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.fh.util.express;
import com.fh.util.express.enums.Method;
import java.util.List;
import java.util.Map;
/**
* Request
*/
public class Request {
public Request() {
}
public Request(Method method, String host, String path, String appKey, String appSecret, int timeout) {
this.method = method;
this.host = host;
this.path = path;
this.appKey = appKey;
this.appSecret = appSecret;
this.timeout = timeout;
}
/**
* (必选)请求方法
*/
private Method method;
/**
* (必选)Host
*/
private String host;
/**
* (必选)Path
*/
private String path;
/**
* (必选)APP KEY
*/
private String appKey;
/**
* (必选)APP密钥
*/
private String appSecret;
/**
* (必选)超时时间,单位毫秒,设置零默认使用com.aliyun.apigateway.demo.constant.Constants.DEFAULT_TIMEOUT
*/
private int timeout;
/**
* (可选) HTTP头
*/
private Map<String, String> headers;
/**
* (可选) Querys
*/
private Map<String, String> querys;
/**
* (可选)表单参数
*/
private Map<String, String> bodys;
/**
* (可选)字符串Body体
*/
private String stringBody;
/**
* (可选)字节数组类型Body体
*/
private byte[] bytesBody;
/**
* (可选)自定义参与签名Header前缀
*/
private List<String> signHeaderPrefixList;
public Method getMethod() {
return method;
}
public void setMethod(Method method) {
this.method = method;
}
public String getHost() {
return host;
}
public void setPath(String path) {
this.path = path;
}
public String getPath() {
return path;
}
public void setHost(String host) {
this.host = host;
}
public String getAppKey() {
return appKey;
}
public void setAppKey(String appKey) {
this.appKey = appKey;
}
public String getAppSecret() {
return appSecret;
}
public void setAppSecret(String appSecret) {
this.appSecret = appSecret;
}
public int getTimeout() {
return timeout;
}
public void setTimeout(int timeout) {
this.timeout = timeout;
}
public Map<String, String> getHeaders() {
return headers;
}
public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}
public Map<String, String> getQuerys() {
return querys;
}
public void setQuerys(Map<String, String> querys) {
this.querys = querys;
}
public Map<String, String> getBodys() {
return bodys;
}
public void setBodys(Map<String, String> bodys) {
this.bodys = bodys;
}
public String getStringBody() {
return stringBody;
}
public void setStringBody(String stringBody) {
this.stringBody = stringBody;
}
public byte[] getBytesBody() {
return bytesBody;
}
public void setBytesBody(byte[] bytesBody) {
this.bytesBody = bytesBody;
}
public List<String> getSignHeaderPrefixList() {
return signHeaderPrefixList;
}
public void setSignHeaderPrefixList(List<String> signHeaderPrefixList) {
this.signHeaderPrefixList = signHeaderPrefixList;
}
}
|