Sync MockServerHttpRequest in spring-test/spring-web
This commit is contained in:
@@ -43,6 +43,8 @@ public class MockServerHttpRequest implements ServerHttpRequest {
|
||||
|
||||
private URI url;
|
||||
|
||||
private String contextPath = "";
|
||||
|
||||
private final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
|
||||
|
||||
private final HttpHeaders headers = new HttpHeaders();
|
||||
@@ -100,6 +102,15 @@ public class MockServerHttpRequest implements ServerHttpRequest {
|
||||
return this.url;
|
||||
}
|
||||
|
||||
public void setContextPath(String contextPath) {
|
||||
this.contextPath = contextPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContextPath() {
|
||||
return this.contextPath;
|
||||
}
|
||||
|
||||
public MockServerHttpRequest addHeader(String name, String value) {
|
||||
getHeaders().add(name, value);
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user