Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 738 for if (0.16 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      @Suppress("NOTHING_TO_INLINE")
      internal inline fun Any.assertThreadHoldsLock() {
        if (assertionsEnabled && !taskRunner.lock.isHeldByCurrentThread) {
          throw AssertionError("Thread ${Thread.currentThread().name} MUST hold lock on $this")
        }
      }
    
      @Suppress("NOTHING_TO_INLINE")
      internal inline fun Any.assertThreadDoesntHoldLock() {
        if (assertionsEnabled && taskRunner.lock.isHeldByCurrentThread) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Request.kt

      fun headers(name: String): List<String> = commonHeaders(name)
    
      /** Returns the tag attached with [T] as a key, or null if no tag is attached with that key. */
      @JvmName("reifiedTag")
      inline fun <reified T : Any> tag(): T? = tag(T::class)
    
      /** Returns the tag attached with [type] as a key, or null if no tag is attached with that key. */
      fun <T : Any> tag(type: KClass<T>): T? = type.java.cast(tags[type])
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

       * possibility for your response.
       */
      @Throws(IOException::class)
      fun bytes() = commonBytes()
    
      /**
       * Returns the response as a [ByteString].
       *
       * This method loads entire response body into memory. If the response body is very large this
       * may trigger an [OutOfMemoryError]. Prefer to stream the response body if this is a
       * possibility for your response.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-HeadersCommon.kt

      apply {
        var i = 0
        while (i < namesAndValues.size) {
          if (name.equals(namesAndValues[i], ignoreCase = true)) {
            namesAndValues.removeAt(i) // name
            namesAndValues.removeAt(i) // value
            i -= 2
          }
          i += 2
        }
      }
    
    /**
     * Set a field with the specified value. If the field is not found, it is added. If the field is
     * found, the existing values are replaced.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/security/oauth2-scopes.md

    * `https://www.googleapis.com/auth/drive` is used by Google.
    
    !!! info
        In OAuth2 a "scope" is just a string that declares a specific permission required.
    
        It doesn't matter if it has other characters like `:` or if it is a URL.
    
        Those details are implementation specific.
    
        For OAuth2 they are just strings.
    
    ## Global view
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/RequestLine.kt

       * URL is. Includes the query component if it exists.
       */
      fun requestPath(url: HttpUrl): String {
        val path = url.encodedPath
        val query = url.encodedQuery
        return if (query != null) "$path?$query" else path
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

          val returnType = method.returnType
          if (methodName == "supports" && Boolean::class.javaPrimitiveType == returnType) {
            return true // ALPN is supported.
          } else if (methodName == "unsupported" && Void.TYPE == returnType) {
            this.unsupported = true // Peer doesn't support ALPN.
            return null
          } else if (methodName == "protocols" && callArgs.isEmpty()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/security/simple-oauth2.md

    We want to get the `current_user` *only* if this user is active.
    
    So, we create an additional dependency `get_current_active_user` that in turn uses `get_current_user` as a dependency.
    
    Both of these dependencies will just return an HTTP error if the user doesn't exist, or if is inactive.
    
    So, in our endpoint, we will only get a user if the user exists, was correctly authenticated, and is active:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

      @get:JvmName("minFreshSeconds") val minFreshSeconds: Int,
      /**
       * This field's name "only-if-cached" is misleading. It actually means "do not use the network".
       * It is set by a client who only wants to make a request if it can be fully satisfied by the
       * cache. Cached responses that would require validation (ie. conditional gets) are not permitted
       * if this header is set.
       */
      @get:JvmName("onlyIfCached") val onlyIfCached: Boolean,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidSocketAdapter.kt

        hostname: String?,
        protocols: List<Protocol>,
      ) {
        // No TLS extensions if the socket class is custom.
        if (matchesSocket(sslSocket)) {
          try {
            // Enable session tickets.
            setUseSessionTickets.invoke(sslSocket, true)
    
            // Assume platform support on 24+
            if (hostname != null && Build.VERSION.SDK_INT <= 23) {
              // This is SSLParameters.setServerNames() in API 24+.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top