Creates a new Request. @param method of the request. @param url for the request. @param headers for the request. @param body for the request, optional. @param requestTemplate used to build the request.
(
HttpMethod method,
String url,
Map<String, Collection<String>> headers,
Body body,
RequestTemplate requestTemplate)
| 176 | * @param requestTemplate used to build the request. |
| 177 | */ |
| 178 | Request( |
| 179 | HttpMethod method, |
| 180 | String url, |
| 181 | Map<String, Collection<String>> headers, |
| 182 | Body body, |
| 183 | RequestTemplate requestTemplate) { |
| 184 | this.httpMethod = checkNotNull(method, "httpMethod of %s", method.name()); |
| 185 | this.url = checkNotNull(url, "url"); |
| 186 | this.headers = checkNotNull(headers, "headers of %s %s", method, url); |
| 187 | this.body = body; |
| 188 | this.requestTemplate = requestTemplate; |
| 189 | protocolVersion = ProtocolVersion.HTTP_1_1; |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Http Method for this request. |
nothing calls this directly
no test coverage detected