Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for HttpClientResponse (0.26 sec)

  1. platforms/software/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpClientResponse.java

    import java.io.IOException;
    import java.io.InputStream;
    import java.net.URI;
    
    public class HttpClientResponse implements Closeable {
    
        private final String method;
        private final URI effectiveUri;
        private final CloseableHttpResponse httpResponse;
        private boolean closed;
    
        HttpClientResponse(String method, URI effectiveUri, CloseableHttpResponse httpResponse) {
            this.method = method;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  2. platforms/software/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpResourceAccessor.java

            String uri = location.getUri().toString();
            LOGGER.debug("Constructing external resource: {}", location);
    
            HttpClientResponse response = http.performGet(uri, revalidate);
            return wrapResponse(location.getUri(), response);
        }
    
        /**
         * Same as #getResource except that it always gives access to the response body,
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. platforms/software/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpClientHelper.java

            }
        }
    
        private HttpClientResponse performRawHead(String source, boolean revalidate) {
            return performRequest(new HttpHead(source), revalidate);
        }
    
        public HttpClientResponse performHead(String source, boolean revalidate) {
            return processResponse(performRawHead(source, revalidate));
        }
    
        HttpClientResponse performRawGet(String source, boolean revalidate) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 17 00:47:05 UTC 2024
    - 13K bytes
    - Viewed (0)
  4. platforms/software/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpResponseResource.java

        private final String method;
        private final URI source;
        private final HttpClientResponse response;
        private final ExternalResourceMetaData metaData;
        private boolean wasOpened;
    
        public HttpResponseResource(String method, URI source, HttpClientResponse response) {
            this.method = method;
            this.source = source;
            this.response = response;
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  5. platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/HttpClientHelperTest.groovy

        def "throws HttpRequestException if an IO error occurs during a request"() {
            def client = new HttpClientHelper(new DocumentationRegistry(), httpSettings) {
                @Override
                protected HttpClientResponse executeGetOrHead(HttpRequestBase method) {
                    throw new IOException("ouch")
                }
            }
    
            when:
            client.performRequest(new HttpGet("http://gradle.org"), false)
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  6. platforms/core-execution/build-cache-http/src/main/java/org/gradle/caching/http/internal/HttpBuildCacheService.java

    import org.gradle.caching.BuildCacheService;
    import org.gradle.internal.UncheckedException;
    import org.gradle.internal.resource.transport.http.HttpClientHelper;
    import org.gradle.internal.resource.transport.http.HttpClientResponse;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.URI;
    import java.net.URISyntaxException;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Mar 04 14:13:12 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. platforms/software/resources-http/src/integTest/groovy/org/gradle/internal/resource/transport/http/HttpResourceAccessorIntegrationTest.groovy

        @Issue("GRADLE-3574")
        def "should not generate any concurrent exception"() {
            def http = Mock(HttpClientHelper) {
                performGet(uri.toString(), _) >> Mock(HttpClientResponse)
            }
            def httpResourceAccessor = new HttpResourceAccessor(http)
    
            when:
            10.times {
                concurrent.start {
                    100.times {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  8. platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/HttpResourceUploaderTest.groovy

            when:
            new HttpResourceUploader(client).upload(resource, name)
    
            then:
            interaction {
                1 * client.performHttpRequest(_) >> new HttpClientResponse("PUT", uri, mockedHttpResponse.response)
                assertIsClosedCorrectly(mockedHttpResponse)
            }
            HttpErrorStatusCodeException exception = thrown()
            exception.message.contains('Could not PUT')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  9. platforms/software/resources-http/src/test/groovy/org/gradle/internal/resource/transport/http/HttpResourceAccessorTest.groovy

        def "should call close() on CloseableHttpResource when getMetaData is called"() {
            def response = mockHttpResponse()
            def http = Mock(HttpClientHelper) {
                performHead(uri.toString(), _) >> new HttpClientResponse("GET", uri, response)
            }
    
            when:
            new HttpResourceAccessor(http).getMetaData(name, false)
    
            then:
            1 * response.close()
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  10. platforms/software/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpResourceUploader.java

            final RepeatableInputStreamEntity entity = new RepeatableInputStreamEntity(resource, ContentType.APPLICATION_OCTET_STREAM);
            method.setEntity(entity);
            try (HttpClientResponse response = http.performHttpRequest(method)) {
                if (!response.wasSuccessful()) {
                    URI effectiveUri = response.getEffectiveUri();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top