Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 340 for if (0.12 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

        url: HttpUrl,
        proxy: Proxy?,
      ) {
        fun selectProxies(): List<Proxy> {
          // If the user specifies a proxy, try that and only that.
          if (proxy != null) return listOf(proxy)
    
          // If the URI lacks a host (as in "http://</"), don't call the ProxySelector.
          val uri = url.toUri()
          if (uri.host == null) return immutableListOf(Proxy.NO_PROXY)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

        handler: Handler,
        length: Int,
        flags: Int,
        streamId: Int,
      ) {
        if (streamId != 0) throw IOException("TYPE_SETTINGS streamId != 0")
        if (flags and FLAG_ACK != 0) {
          if (length != 0) throw IOException("FRAME_SIZE_ERROR ack frame should be empty!")
          handler.ackSettings()
          return
        }
    
        if (length % 6 != 0) throw IOException("TYPE_SETTINGS length % 6 != 0: $length")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

      for (file in files) {
        try {
          if (metadata(file).isDirectory) {
            deleteContents(file)
          }
    
          delete(file)
        } catch (ioe: IOException) {
          if (exception == null) {
            exception = ioe
          }
        }
      }
      if (exception != null) {
        throw exception
      }
    }
    
    internal fun <E> MutableList<E>.addIfAbsent(element: E) {
      if (!contains(element)) add(element)
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

       * until one is ready. If there are no ready queues, or if other threads have everything under
       * control this will return null. If there is more than a single task ready to execute immediately
       * this will start another thread to handle that work.
       */
      fun awaitTaskToRun(): Task? {
        lock.assertHeld()
    
        while (true) {
          if (readyQueues.isEmpty()) {
            return null // Nothing to do.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/idn/IdnStringprep.kt

          if (codePoint in prohibitSet) return null
    
          if (first) {
            firstIsRandalcat = codePoint in randalcatSet
          } else if (firstIsRandalcat) {
            // 'If a string contains any RandALCat character, the string MUST NOT contain any LCat
            // character.'
            if (codePoint in lcatSet) return null
    
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  6. docs/features/calls.md

    Some requests will have a cached response. When this cached response isn’t fresh, OkHttp can do a _conditional GET_ to download an updated response if it’s newer than what’s cached. This requires headers like `If-Modified-Since` and `If-None-Match` to be added.
    
    ## Rewriting Responses
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

        if (queryNamesAndValues == null) return null
        for (i in 0 until queryNamesAndValues.size step 2) {
          if (name == queryNamesAndValues[i]) {
            return queryNamesAndValues[i + 1]
          }
        }
        return null
      }
    
      /**
       * The distinct query parameter names in this URL, like `["a", "b"]` for
       * `http://host/?a=apple&b=banana`. If this URL has no query this is the empty set.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

     *     val part = multipartReader.nextPart() ?: break
     *     process(part.headers, part.body)
     *   }
     * }
     * ```
     *
     * Note that [nextPart] will skip any unprocessed data from the preceding part. If the preceding
     * part is particularly large or if the underlying source is particularly slow, the [nextPart] call
     * may be slow!
     *
     * Closing a part **does not** close this multipart reader; callers must explicitly close this with
     * [close].
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  9. build.gradle.kts

      if (project.name == "okhttp-android") return@subprojects
      if (project.name == "android-test") return@subprojects
      if (project.name == "regression-test") return@subprojects
      if (project.name == "android-test-app") return@subprojects
      if (project.name == "container-tests") return@subprojects
    
      apply(plugin = "checkstyle")
      apply(plugin = "ru.vyarus.animalsniffer")
      apply(plugin = "biz.aQute.bnd.builder")
    
      tasks.withType<JavaCompile> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:32:42 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

      val address = remoteSocketAddress
      return if (address is InetSocketAddress) address.hostName else address.toString()
    }
    
    /**
     * Returns true if new reads and writes should be attempted on this.
     *
     * Unfortunately Java's networking APIs don't offer a good health check, so we go on our own by
     * attempting to read with a short timeout. If the fails immediately we know the socket is
     * unhealthy.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top