本文整理了Java中io.vertx.reactivex.core.MultiMap.caseInsensitiveMultiMap()
方法的一些代码示例,展示了MultiMap.caseInsensitiveMultiMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.caseInsensitiveMultiMap()
方法的具体详情如下:
包路径:io.vertx.reactivex.core.MultiMap
类名称:MultiMap
方法名:caseInsensitiveMultiMap
暂无
代码示例来源:origin: io.knotx/knotx-core
public ClientRequest(ClientRequest request) {
this.path = request.path;
this.method = request.method;
this.headers = MultiMap.caseInsensitiveMultiMap().setAll(request.headers);
this.params = MultiMap.caseInsensitiveMultiMap().setAll(request.params);
this.formAttributes = MultiMap.caseInsensitiveMultiMap().setAll(request.formAttributes);
}
代码示例来源:origin: io.knotx/knotx-core
private MultiMap headers(Optional<String> contentType) {
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
contentType.ifPresent(s -> headers.add("Content-Type", s));
return headers;
}
代码示例来源:origin: io.knotx/knotx-repository-connector-filesystem
private MultiMap headers(Optional<String> contentType) {
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
contentType.ifPresent(s -> headers.add("Content-Type", s));
return headers;
}
代码示例来源:origin: Cognifide/knotx
public ClientRequest(ClientRequest request) {
this.path = request.path;
this.method = request.method;
this.headers = MultiMap.caseInsensitiveMultiMap().setAll(request.headers);
this.params = MultiMap.caseInsensitiveMultiMap().setAll(request.params);
this.formAttributes = MultiMap.caseInsensitiveMultiMap().setAll(request.formAttributes);
}
代码示例来源:origin: Cognifide/knotx
private MultiMap headers(Optional<String> contentType) {
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
contentType.ifPresent(s -> headers.add("Content-Type", s));
return headers;
}
代码示例来源:origin: io.knotx/knotx-core
@GenIgnore
public ClientRequest setParams(MultiMap params) {
this.params = MultiMap.caseInsensitiveMultiMap().addAll(params);
return this;
}
代码示例来源:origin: Cognifide/knotx
@GenIgnore
public ClientRequest setFormAttributes(MultiMap formAttributes) {
this.formAttributes = MultiMap.caseInsensitiveMultiMap().addAll(formAttributes);
return this;
}
代码示例来源:origin: io.knotx/knotx-core
@GenIgnore
public ClientResponse setHeaders(MultiMap headers) {
this.headers = MultiMap.caseInsensitiveMultiMap().addAll(headers);
return this;
}
代码示例来源:origin: io.knotx/knotx-core
@GenIgnore
public ClientRequest setHeaders(MultiMap headers) {
this.headers = MultiMap.caseInsensitiveMultiMap().addAll(headers);
return this;
}
代码示例来源:origin: io.knotx/knotx-core
@GenIgnore
public ClientRequest setFormAttributes(MultiMap formAttributes) {
this.formAttributes = MultiMap.caseInsensitiveMultiMap().addAll(formAttributes);
return this;
}
代码示例来源:origin: Cognifide/knotx
@GenIgnore
public ClientRequest setHeaders(MultiMap headers) {
this.headers = MultiMap.caseInsensitiveMultiMap().addAll(headers);
return this;
}
代码示例来源:origin: Cognifide/knotx
@GenIgnore
public ClientRequest setParams(MultiMap params) {
this.params = MultiMap.caseInsensitiveMultiMap().addAll(params);
return this;
}
代码示例来源:origin: io.knotx/knotx-junit
public static KnotContext create(List<Pair<List<String>, String>> fragments) {
return new KnotContext()
.setFragments(
fragments != null
? fragments.stream().map(data -> Fragment.snippet(data.getKey(), data.getValue())).collect(Collectors.toList())
: null)
.setClientRequest(new ClientRequest())
.setClientResponse(
new ClientResponse()
.setHeaders(MultiMap.caseInsensitiveMultiMap()));
}
代码示例来源:origin: io.knotx/knotx-junit
public static KnotContext empty(String template) {
return new KnotContext()
.setClientResponse(
new ClientResponse()
.setBody(StringUtils.isEmpty(template) ? Buffer.buffer() : Buffer.buffer(template))
.setStatusCode(HttpResponseStatus.OK.code())
.setHeaders(MultiMap.caseInsensitiveMultiMap()))
.setClientRequest(new ClientRequest());
}
代码示例来源:origin: Cognifide/knotx
public ClientRequest(HttpServerRequest serverRequest) {
this.path = serverRequest.path();
this.method = serverRequest.method();
this.headers = MultiMap.caseInsensitiveMultiMap().setAll(serverRequest.headers());
this.params = UriHelper.getParams(serverRequest.uri());
this.formAttributes = MultiMap.caseInsensitiveMultiMap().setAll(serverRequest.formAttributes());
}
代码示例来源:origin: io.knotx/knotx-core
public ClientRequest(HttpServerRequest serverRequest) {
this.path = serverRequest.path();
this.method = serverRequest.method();
this.headers = MultiMap.caseInsensitiveMultiMap().setAll(serverRequest.headers());
this.params = UriHelper.getParams(serverRequest.uri());
this.formAttributes = MultiMap.caseInsensitiveMultiMap().setAll(serverRequest.formAttributes());
}
代码示例来源:origin: Cognifide/knotx
@Test
public void handleRepositoryResponse_whenResponseIsSuccessAndShouldNotBeProcessed_expectResponse() {
when(clientResponse.getStatusCode()).thenReturn(200);
when(repositoryEntry.isDoProcessing()).thenReturn(false);
when(clientResponse.getHeaders()).thenReturn(MultiMap.caseInsensitiveMultiMap());
when(clientResponse.getBody()).thenReturn(Buffer.buffer().getDelegate());
when(routingContext.response()).thenReturn(httpServerResponse);
tested.handleRepositoryResponse(clientResponse, routingContext, repositoryEntry, knotContext);
verify(routingContext, times(0)).next();
verify(httpServerResponse, times(1)).setStatusCode(200);
verify(httpServerResponse, times(1)).end(any(Buffer.class));
}
代码示例来源:origin: Cognifide/knotx
@Test
public void handleRepositoryResponse_whenResponseIsError_expectErrorResponse() {
when(clientResponse.getStatusCode()).thenReturn(400);
when(clientResponse.getHeaders()).thenReturn(MultiMap.caseInsensitiveMultiMap());
when(clientResponse.getBody()).thenReturn(Buffer.buffer().getDelegate());
when(routingContext.response()).thenReturn(httpServerResponse);
tested.handleRepositoryResponse(clientResponse, routingContext, repositoryEntry, knotContext);
verify(routingContext, times(0)).next();
verify(httpServerResponse, times(1)).setStatusCode(400);
verify(httpServerResponse, times(1)).end(any(Buffer.class));
}
}
代码示例来源:origin: Cognifide/knotx
public static KnotContext empty(String template) {
return new KnotContext()
.setClientResponse(
new ClientResponse()
.setBody(StringUtils.isEmpty(template) ? Buffer.buffer() : Buffer.buffer(template))
.setStatusCode(HttpResponseStatus.OK.code())
.setHeaders(MultiMap.caseInsensitiveMultiMap()))
.setClientRequest(new ClientRequest());
}
代码示例来源:origin: Cognifide/knotx
private void testPostRequest(VertxTestContext context, Vertx vertx, String url,
Consumer<HttpResponse<Buffer>> expectedResponse) {
WebClient client = WebClient.create(vertx);
MultiMap formData = MultiMap.caseInsensitiveMultiMap();
formData.add("a", "b");
Single<HttpResponse<Buffer>> httpResponseSingle = client
.post(KnotxServerRoutingTest.KNOTX_SERVER_PORT,
KnotxServerRoutingTest.KNOTX_SERVER_ADDRESS,
url)
.rxSendForm(formData);
subscribeToResult_shouldSucceed(context, httpResponseSingle, expectedResponse);
}
内容来源于网络,如有侵权,请联系作者删除!