@Override public ApplicationLinkRequest setFollowRedirects(boolean follow) { delegateRequest.setFollowRedirects(follow); return this; }
public AbstractApplicationLinkRequest(final String url, final Request wrappedRequest) { this.url = url; this.wrappedRequest = new ApplicationLinkRequestAdaptor(wrappedRequest); this.wrappedRequest.setFollowRedirects(false); }
public AbstractApplicationLinkRequest(final String url, final Request wrappedRequest) { this.url = url; this.wrappedRequest = new ApplicationLinkRequestAdaptor(wrappedRequest); this.wrappedRequest.setFollowRedirects(false); }
@Override public RemoteResponse<String> getPageId(final ApplicationLink applicationLink, String pageUrl) throws CredentialsRequiredException, ResponseException { final ApplicationLinkRequestFactory requestFactory = applicationLink.createAuthenticatedRequestFactory(); // Strip fragment identifier final int hash = pageUrl.indexOf('#'); if (hash >= 0) { pageUrl = pageUrl.substring(0, hash); } final ApplicationLinkRequest request = requestFactory.createRequest(Request.MethodType.GET, pageUrl); request.setFollowRedirects(false); return request.execute(new PageResponseHandler(requestFactory)); }
private AuthorisationUriAwareRequest buildRequest(@Nonnull ApplicationLinkRequestFactory requestFactory) throws CredentialsRequiredException { ApplicationLinkRequest request = requestFactory .createRequest(methodType, url.toString()) .setHeader(HttpHeaders.ACCEPT, accept) .addHeader(OVERRIDE_HEADER_NAME, OVERRIDE_HEADER_VALUE) .setConnectionTimeout(connectionTimeoutMillis) .setSoTimeout(socketTimeoutMillis) .setFollowRedirects(followRedirects); if (body != null && isMutatingMethodType()) { request.setEntity(body); request.setHeader(HttpHeaders.CONTENT_TYPE, contentType); } for (Map.Entry<String, String> header : headers.entrySet()) { request.setHeader(header.getKey(), header.getValue()); } return new DefaultAuthorisationUriAwareRequest(request, requestFactory); }
ApplicationLinkRequest request = requestFactory.createRequest(Request.MethodType.GET, url.toString()).setFollowRedirects(true);
ApplicationLinkRequest request = requestFactory.createRequest(Request.MethodType.GET, url.toString()).setFollowRedirects(true);
request.setFollowRedirects(false); return request.execute(this);