Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for forge (0.16 sec)

  1. okhttp/src/main/kotlin/okhttp3/Dns.kt

     * [system DNS service][SYSTEM], which is the default. Some applications may provide their own
     * implementation to use a different DNS server, to prefer IPv6 addresses, to prefer IPv4 addresses,
     * or to force a specific known IP address.
     *
     * Implementations of this interface must be safe for concurrent use.
     */
    fun interface Dns {
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        // Write metadata to the end of the file.
        writeMetadata(upstreamSize)
        file!!.channel.force(false)
    
        // Once everything else is in place we can swap the dirty header for a clean one.
        writeHeader(PREFIX_CLEAN, upstreamSize, metadata.size.toLong())
        file!!.channel.force(false)
    
        // This file is complete.
        synchronized(this@Relay) {
          complete = true
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

            val headers = request.headers
    
            if (requestBody != null) {
              // Request body headers are only present when installed as a network interceptor. When not
              // already present, force them to be included (if available) so their values are known.
              requestBody.contentType()?.let {
                if (headers["Content-Type"] == null) {
                  logger.log("Content-Type: $it")
                }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  4. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

          "FGHIJKLMNOPQRSTUVWXYZ",
        )
        inputStream.close()
        assertContent("ABCDEFGHIJKLMNOPQRSTUVWXYZ", getResponse(newRequest("/")))
      }
    
      /**
       * We've had a bug where we forget the HTTP response when we see response code 401. This causes a
       * new HTTP request to be issued for every call into the URLConnection.
       */
      @Test
      fun unauthorizedResponseHandling() {
        val mockResponse =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val noTransform: Boolean = cacheControl.noTransform
        val immutable: Boolean = cacheControl.immutable
        val forceCache: CacheControl = CacheControl.FORCE_CACHE
        val forceNetwork: CacheControl = CacheControl.FORCE_NETWORK
        val parse: CacheControl = CacheControl.parse(headersOf())
      }
    
      @Test
      fun cacheControlBuilder() {
        var builder: CacheControl.Builder = CacheControl.Builder()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

          listener.onClosed(this, code, reason!!)
        }
    
        readerToClose?.closeQuietly()
        streamsToClose?.closeQuietly()
      }
    
      /** For testing: force this web socket to release its threads. */
      @Throws(InterruptedException::class)
      fun tearDown() {
        taskQueue.shutdown()
        taskQueue.idleLatch().await(10, TimeUnit.SECONDS)
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/EventListenerTest.kt

      }
    
      @Test
      fun satisfactionFailure() {
        enableCache()
        val call =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .cacheControl(CacheControl.FORCE_CACHE)
              .build(),
          )
        val response = call.execute()
        assertThat(response.code).isEqualTo(504)
        response.close()
        assertThat(listener.recordedEventTypes())
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        set("a", "a1234", "a1234")
        val a = cache.edit("a")!!
        a.setString(0, "a123")
        cache.maxSize = 8 // Smaller than the sum of active edits!
        cache.flush() // Force trimToSize().
        assertThat(cache.size()).isEqualTo(expectedByteCount)
        assertThat(readFileOrNull(getCleanFile("a", 0))).isEqualTo(afterRemoveFileContents)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java

          if (i == 2) {
            // Force this request's response to be written to the cache. This way, subsequent responses
            // can be read from the cache.
            System.out.println("Force cache: true");
            clientForCall = client.newBuilder()
                .addNetworkInterceptor(REWRITE_CACHE_CONTROL_INTERCEPTOR)
                .build();
          } else {
            System.out.println("Force cache: false");
            clientForCall = client;
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.6K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

          }
        assertThat(requestsMade.size).isEqualTo(0)
        mockWebServer.dispatcher = dispatcher
        val url = mockWebServer.url("/").toUrl()
        val conn = url.openConnection() as HttpURLConnection
        conn.responseCode // Force the connection to hit the "server".
        // Make sure our dispatcher got the request.
        assertThat(requestsMade.size).isEqualTo(1)
      }
    
      @Test
      fun outOfOrderResponses() {
        val firstResponseCode = AtomicInteger()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
Back to top