Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 51 for could (0.25 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

         * execute all peer settings logic on the writer thread. This relies on the fact that the
         * writer task queue won't reorder tasks; otherwise settings could be applied in the opposite
         * order than received.
         */
        fun applyAndAckSettings(
          clearPrevious: Boolean,
          settings: Settings,
        ) {
          var delta: Long
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http/DateFormatting.kt

        "EEE MMM d yyyy HH:mm:ss z",
      )
    
    private val BROWSER_COMPATIBLE_DATE_FORMATS =
      arrayOfNulls<DateFormat>(BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS.size)
    
    /** Returns the date for this string, or null if the value couldn't be parsed. */
    fun String.toHttpDateOrNull(): Date? {
      if (isEmpty()) return null
    
      val position = ParsePosition(0)
      var result = STANDARD_DATE_FORMAT.get().parse(this, position)
      if (position.index == length) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

                if (pin.hash == sha1) return // Success!
              }
              else -> throw AssertionError("unsupported hashAlgorithm: ${pin.hashAlgorithm}")
            }
          }
        }
    
        // If we couldn't find a matching pin, format a nice exception.
        val message =
          buildString {
            append("Certificate pinning failure!")
            append("\n  Peer certificate chain:")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  4. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

      }
    
      /**
       * Prepares the HTTP headers and sends them to the server.
       *
       * For streaming requests with a body, headers must be prepared **before** the output stream has
       * been written to. Otherwise the body would need to be buffered!
       *
       * For non-streaming requests with a body, headers must be prepared **after** the output stream
       * has been written to and closed. This ensures that the `Content-Length` header field receives
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(inputStream.read()).isEqualTo('B'.code)
        assertThat(inputStream.read()).isEqualTo('C'.code)
        try {
          inputStream.read() // if Content-Length was accurate, this would return -1 immediately
          fail<Any>()
        } catch (expected: SocketTimeoutException) {
        }
        val urlConnection2 = server.url("/").toUrl().openConnection()
        val in2 = urlConnection2.getInputStream()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

                  val metadata = snapshot.getSource(ENTRY_METADATA).buffer()
                  nextUrl = metadata.readUtf8LineStrict()
                  return true
                }
              } catch (_: IOException) {
                // We couldn't read the metadata for this snapshot; possibly because the host filesystem
                // has disappeared! Skip it.
              }
            }
    
            return false
          }
    
          override fun next(): String {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

        }
    
        /**
         * Returns a snapshot of this entry. This opens all streams eagerly to guarantee that we see a
         * single published snapshot. If we opened streams lazily then the streams could come from
         * different edits.
         */
        internal fun snapshot(): Snapshot? {
          ******@****.***ThreadHoldsLock()
    
          if (!readable) return null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  8. .github/CONTRIBUTING.md

    Contributing
    ============
    
    If you would like to contribute code to OkHttp you can do so through GitHub by
    forking the repository and sending a pull request.
    
    When submitting code, please make every effort to follow existing conventions
    and style in order to keep the code as readable as possible. Please also make
    sure your code compiles by running `./gradlew check`. Checkstyle failures
    during compilation indicate errors in your style and can be viewed in the
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 17 04:16:26 GMT 2019
    - 1.4K bytes
    - Viewed (0)
  9. docs/features/caching.md

     
    ## Pruning the Cache
    
    Pruning the entire Cache to clear space temporarily can be done using evictAll.
    
    ```kotlin
    cache.evictAll()
    ```
    
    Removing individual items can be done using the urls iterator.
    This would be typical after a user initiates a force refresh by a pull to refresh type action.
    
    ```java
        val urlIterator = cache.urls()
        while (urlIterator.hasNext()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  10. docs/features/calls.md

    ## Retrying Requests
    
    Sometimes connections fail: either a pooled connection was stale and disconnected, or the webserver itself couldn’t be reached. OkHttp will retry the request with a different route if one is available.
    
    ## [Calls](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-call/)
    
    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)
Back to top