Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for given (0.17 sec)

  1. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        assertThat(parse("http://@host/path"))
          .isEqualTo(parse("http://host/path"))
        assertThat(parse("http://user@host/path"))
          .isEqualTo(parse("http://user@host/path"))
      }
    
      /**
       * Given multiple '@' characters, the last one is the delimiter.
       */
      @Test
      fun authorityWithMultipleAtSigns() {
        val httpUrl = parse("http://foo@bar@baz/path")
        assertThat(httpUrl.username).isEqualTo("foo@bar")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     * should give up.
     *
     * When reactive authentication is requested by an origin web server, the response code is 401
     * and the implementation should respond with a new request that sets the "Authorization" header.
     *
     * ```java
     * if (response.request().header("Authorization") != null) {
     *   return null; // Give up, we've already failed to authenticate.
     * }
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt

              override fun authenticate(
                route: Route?,
                response: Response,
              ): Request? {
                if (response.request.header("Authorization") != null) {
                  return null // Give up, we've already attempted to authenticate.
                }
    
                println("Authenticating for response: $response")
                println("Challenges: ${response.challenges()}")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

            init(null, arrayOf<TrustManager>(trustManager), null)
          }.socketFactory
        } catch (e: GeneralSecurityException) {
          throw AssertionError("No System TLS: $e", e) // The system has no TLS. Just give up.
        }
      }
    
      override fun toString(): String = javaClass.simpleName
    
      companion object {
        @Volatile private var platform = findPlatform()
    
        const val INFO = 4
        const val WARN = 5
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

        while (pos < limit) {
          var dot = string.indexOf('.', startIndex = pos)
          if (dot == -1) dot = limit
    
          if (!encodeLabel(string, pos, dot, result)) {
            // If we couldn't encode the label, give up.
            return null
          }
    
          if (dot < limit) {
            result.writeByte('.'.code)
            pos = dot + 1
          } else {
            break
          }
        }
    
        return result.readUtf8()
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        response1.body.source().timeout().timeout(100, TimeUnit.MILLISECONDS)
        assertContent("This connection won't pool properly", response1)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
    
        // Give the server time to enact the socket policy if it's one that could happen after the
        // client has received the response.
        Thread.sleep(500)
        val response2 = getResponse(newRequest("/b"))
    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)
  7. docs/changelogs/changelog_4x.md

            .addInterceptor(BrotliInterceptor)
            .build()
        ```
    
        This artifact has a dependency on Google's Brotli decoder (95 KiB).
    
     *  New: `EventListener.proxySelectStart()`, `proxySelectEnd()` events give visibility into the
        proxy selection process.
     *  New: `Response.byteString()` reads the entire response into memory as a byte string.
     *  New: `OkHttpClient.x509TrustManager` accessor.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

       * HTTP connections when connection reuse is in practice.
       */
      val requestCount: Int
        get() = atomicRequestCount.get()
    
      /** The number of bytes of the POST body to keep in memory to the given limit. */
      var bodyLimit: Long = Long.MAX_VALUE
    
      var serverSocketFactory: ServerSocketFactory? = null
        @Synchronized get() {
          if (field == null && started) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

    import okhttp3.Response
    import okhttp3.internal.http.HTTP_PERM_REDIRECT
    import okhttp3.internal.http.HTTP_TEMP_REDIRECT
    import okhttp3.internal.http.toHttpDateOrNull
    import okhttp3.internal.toNonNegativeInt
    
    /**
     * Given a request and cached response, this figures out whether to use the network, the cache, or
     * both.
     *
     * Selecting a cache strategy may add conditions to the request (like the "If-Modified-Since" header
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

      }
    
      /**
       * Attempts to acquire a recycled connection to [address] for [connectionUser]. Returns the connection if it
       * was acquired, or null if no connection was acquired. The acquired connection will also be
       * given to [connectionUser] who may (for example) assign it to a [RealCall.connection].
       *
       * This confirms the returned connection is healthy before returning it. If this encounters any
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top