Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for behaviour (0.17 sec)

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

        }
      }
    
      companion object {
        /**
         * Returns a new response body that transmits this string. If [contentType] is non-null and
         * has a charset other than utf-8 the behaviour differs by platform.
         *
         * On the JVM the encoding will be used instead of utf-8.
         *
         * On non JVM platforms, this method will fail for encodings other than utf-8.
         */
        @JvmStatic
    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)
  2. docs/changelogs/changelog_4x.md

     *  Fix: Follow HTTP 307 and 308 redirects on methods other than GET and POST. We're reluctant to
        change OkHttp's behavior in handling common HTTP status codes, but this fix is overdue! The new
        behavior is now consistent with [RFC 7231][rfc_7231_647], which is newer than OkHttp itself.
        If you want this update with the old behavior use [this interceptor][legacy_interceptor].
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

            if (fileSystem.exists(dirty)) {
              val clean = entry.cleanFiles[i]
              fileSystem.atomicMove(dirty, clean)
              val oldLength = entry.lengths[i]
              // TODO check null behaviour
              val newLength = fileSystem.metadata(clean).size ?: 0
              entry.lengths[i] = newLength
              size = size - oldLength + newLength
            }
          } else {
            fileSystem.deleteIfExists(dirty)
    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)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          }
    
        /**
         * Throttles the request reader and response writer to sleep for the given period after each
         * series of [bytesPerPeriod] bytes are transferred. Use this to simulate network behavior.
         */
        fun throttleBody(
          bytesPerPeriod: Long,
          period: Long,
          unit: TimeUnit,
        ) = apply {
          throttleBytesPerPeriod = bytesPerPeriod
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  5. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val inputStream = connection.getInputStream()
        assertThat(inputStream.read()).isEqualTo('a'.code)
        try {
          val byteRead = inputStream.read()
          // OpenJDK behavior: end of stream.
          assertThat(byteRead).isEqualTo(-1)
        } catch (e: ProtocolException) {
          // On Android, HttpURLConnection is implemented by OkHttp v2. OkHttp
    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/test/java/okhttp3/internal/ws/WebSocketReaderTest.kt

    class WebSocketReaderTest {
      private val data = Buffer()
      private val callback = WebSocketRecorder("client")
      private val random = Random(0)
    
      // Mutually exclusive. Use the one corresponding to the peer whose behavior you wish to test.
      private val serverReader =
        WebSocketReader(
          isClient = false,
          source = data,
          frameCallback = callback.asFrameCallback(),
          perMessageDeflate = false,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

    import org.junit.jupiter.api.Test
    
    @Tag("Slow")
    class RealWebSocketTest {
      // NOTE: Fields are named 'client' and 'server' for cognitive simplicity. This differentiation has
      // zero effect on the behavior of the WebSocket API which is why tests are only written once
      // from the perspective of a single peer.
      private val random = Random(0)
      private val client2Server = Pipe(8192L)
      private val server2client = Pipe(8192L)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

         * parameters, and as it turns out Firefox and Chrome actually do rather different things, and
         * both say in their comments that they're not really sure what the right approach is. We go
         * with Chrome's behavior (which also experimentally seems to match what IE does), but if you
         * actually want to have a good chance of things working, please avoid double-quotes, newlines,
         * percent signs, and the like in your field names.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_2x.md

        4.2.2.
     *  Fix: Drop partial support for HTTP/1.0. Previously OkHttp would send
        `HTTP/1.0` on connections after seeing a response with `HTTP/1.0`. The fixed
        behavior is consistent with Firefox and Chrome.
     *  Fix: Allow a body in `OPTIONS` requests.
     *  Fix: Don't percent-encode non-ASCII characters in URL fragments.
     *  Fix: Handle null fragments.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

          // RealRoutePlanner will add the connection to the pool itself, other RoutePlanners may not
          // TODO: make all RoutePlanners consistent in this behavior
          if (connection !in connections) {
            connection.withLock { put(connection) }
          }
    
          return 0L // run again immediately to create more connections if needed
        } catch (e: IOException) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top