本文整理了Java中org.jclouds.http.HttpRequest.getFilters()
方法的一些代码示例,展示了HttpRequest.getFilters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.getFilters()
方法的具体详情如下:
包路径:org.jclouds.http.HttpRequest
类名称:HttpRequest
方法名:getFilters
暂无
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), QuerySigner.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), BasicAuthentication.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), BasicAuthentication.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), SignRequest.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), BasicAuthentication.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), SharedKeyLiteAuthentication.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), SignRequest.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), FormSigner.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), BasicAuthentication.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
@Override
protected void checkFilters(HttpRequest request) {
assertEquals(request.getFilters().size(), 1);
assertEquals(request.getFilters().get(0).getClass(), AddVCloudAuthorizationAndCookieToRequest.class);
}
代码示例来源:origin: jclouds/legacy-jclouds
public static <T> HttpRequest cleanRequest(HttpRequest returnVal) {
checkNotNull(returnVal, "http request");
for (HttpRequestFilter filter : returnVal.getFilters())
returnVal = filter.filter(returnVal);
return HttpRequest.builder().method(returnVal.getMethod()).endpoint(returnVal.getEndpoint())
.headers(returnVal.getHeaders()).payload(returnVal.getPayload()).build();
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testSignRemoveBlob() throws ArrayIndexOutOfBoundsException, SecurityException, IllegalArgumentException,
NoSuchMethodException, IOException {
HttpRequest request = signer.signRemoveBlob("container", "name");
assertRequestLineEquals(request,
"DELETE https://accesspoint.atmosonline.com/rest/namespace/container/name HTTP/1.1");
assertNonPayloadHeadersEqual(
request,
"Accept: */*\nDate: Thu, 05 Jun 2008 16:38:19 GMT\nx-emc-signature: cPnxwSdWfIjChx8sox+43U9oo20=\nx-emc-uid: identity\n");
assertPayloadEquals(request, null, null, false);
assertEquals(request.getFilters().size(), 0);
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testSignGetBlob() throws ArrayIndexOutOfBoundsException, SecurityException, IllegalArgumentException,
NoSuchMethodException, IOException {
HttpRequest request = signer.signGetBlob("container", "name");
assertRequestLineEquals(request, "GET https://identity.blob.core.windows.net/container/name HTTP/1.1");
assertNonPayloadHeadersEqual(
request,
"Authorization: SharedKeyLite identity:nutCr98JWBu7wbe1p9rDiyOXg3o6UqI4tEZ29bctKEU=\nDate: Thu, 05 Jun 2008 16:38:19 GMT\nx-ms-version: 2009-09-19\n");
assertPayloadEquals(request, null, null, false);
assertEquals(request.getFilters().size(), 0);
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testSignRemoveBlob() throws ArrayIndexOutOfBoundsException, SecurityException, IllegalArgumentException,
NoSuchMethodException, IOException {
HttpRequest request = signer.signRemoveBlob("container", "name");
assertRequestLineEquals(request, "DELETE https://identity.blob.core.windows.net/container/name HTTP/1.1");
assertNonPayloadHeadersEqual(
request,
"Authorization: SharedKeyLite identity:GRixvGXJ05tuWANrM5xeWOAAVqfztvmPLpwCRcWPZEk=\nDate: Thu, 05 Jun 2008 16:38:19 GMT\nx-ms-version: 2009-09-19\n");
assertPayloadEquals(request, null, null, false);
assertEquals(request.getFilters().size(), 0);
}
代码示例来源:origin: jclouds/legacy-jclouds
public T fromHttpRequest(HttpRequest in) {
return super.fromHttpMessage(in)
.method(in.getMethod())
.endpoint(in.getEndpoint())
.filters(in.getFilters());
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testSignRemoveBlob() throws ArrayIndexOutOfBoundsException, SecurityException, IllegalArgumentException,
NoSuchMethodException, IOException {
HttpRequest request = signer.signRemoveBlob(containerName, blobName);
assertRequestLineEquals(request, "DELETE " + fullUrl + " HTTP/1.1");
assertNonPayloadHeadersEqual(request, "Authorization: Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==\n");
assertPayloadEquals(request, null, null, false);
assertEquals(request.getFilters().size(), 0);
}
代码示例来源:origin: org.jclouds/jclouds-core
public T fromHttpRequest(HttpRequest in) {
return super.fromHttpMessage(in)
.method(in.getMethod())
.endpoint(in.getEndpoint())
.filters(in.getFilters());
}
}
代码示例来源:origin: io.cloudsoft.jclouds/jclouds-core
public T fromHttpRequest(HttpRequest in) {
return super.fromHttpMessage(in)
.method(in.getMethod())
.endpoint(in.getEndpoint())
.filters(in.getFilters());
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testSignGetBlob() throws ArrayIndexOutOfBoundsException, SecurityException, IllegalArgumentException,
NoSuchMethodException, IOException {
HttpRequest request = signer.signGetBlob("container", "name");
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/container/name HTTP/1.1");
assertNonPayloadHeadersEqual(
request,
"Accept: */*\nDate: Thu, 05 Jun 2008 16:38:19 GMT\nx-emc-signature: DHDKwV6IPsJJvtrI9ktTiKq9us4=\nx-emc-uid: identity\n");
assertPayloadEquals(request, null, null, false);
assertEquals(request.getFilters().size(), 0);
}
代码示例来源:origin: jclouds/legacy-jclouds
public HTTPRequest filterLogAndConvertRe(HttpRequest request) {
for (HttpRequestFilter filter : request.getFilters()) {
request = filter.filter(request);
}
checkRequestHasContentLengthOrChunkedEncoding(request,
"After filtering, the request has neither chunked encoding nor content length: " + request);
logger.debug("Sending request %s: %s", request.hashCode(), request.getRequestLine());
wirePayloadIfEnabled(wire, request);
HTTPRequest nativeRequest = convertToGaeRequest.apply(request);
utils.logRequest(headerLog, request, ">>");
return nativeRequest;
}
内容来源于网络,如有侵权,请联系作者删除!