[#1141]RequestData add constructors so that we can set attributes
This commit is contained in:
committed by
Olga Maciaszek-Sharma
parent
5f32ef216f
commit
e1061af545
@@ -74,6 +74,11 @@ public class RequestData {
|
||||
new HashMap<>());
|
||||
}
|
||||
|
||||
public RequestData(ServerHttpRequest request, Map<String, Object> attributes) {
|
||||
this(request.getMethod(), request.getURI(), request.getHeaders(), buildCookies(request.getCookies()),
|
||||
attributes);
|
||||
}
|
||||
|
||||
private static MultiValueMap<String, String> buildCookies(MultiValueMap<String, HttpCookie> cookies) {
|
||||
HttpHeaders newCookies = new HttpHeaders();
|
||||
if (cookies != null) {
|
||||
|
||||
Reference in New Issue
Block a user