Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for reorder (0.15 sec)

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

    import assertk.assertions.isNull
    import assertk.assertions.isTrue
    import java.io.IOException
    import java.text.SimpleDateFormat
    import java.util.Date
    
    /**
     * A received response or failure recorded by the response recorder.
     */
    class RecordedResponse(
      @JvmField val request: Request,
      val response: Response?,
      val webSocket: WebSocket?,
      val body: String?,
      val failure: IOException?,
    ) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt

        assertThat(response.body.string()).isEqualTo("hello, OkHttp")
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip")
        assertThat(recorded.headers["Connection"]).isEqualTo("Keep-Alive")
        assertThat(recorded.headers["User-Agent"]!!).matches(Regex("okhttp/.*"))
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

         *
         * ## Upstream
         *
         * In this case the current thread is assigned as the upstream reader. We read bytes from
         * upstream and copy them to both the file and to the buffer. Finally we release the upstream
         * reader lock and return the new bytes.
         *
         * ## The file
         *
         * In this case we copy bytes from the file to the [sink].
         *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  4. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isNull() // No built-in gzip.
        assertThat(recorded.headers["Connection"]).isEqualTo("Upgrade, HTTP2-Settings")
        if (PlatformVersion.majorVersion < 19) {
          assertThat(recorded.headers["Content-Length"]).isEqualTo("0")
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  5. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

        }
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip, x-gzip, deflate")
        assertThat(recorded.headers["Connection"]).isEqualTo("keep-alive")
        assertThat(recorded.headers["User-Agent"]!!).startsWith("Apache-HttpClient/")
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

       *
       * If there's nothing to read and no default value, this will throw an exception.
       */
      fun fromDer(reader: DerReader): T
    
      fun fromDer(byteString: ByteString): T {
        val buffer = Buffer().write(byteString)
        val reader = DerReader(buffer)
        return fromDer(reader)
      }
    
      /**
       * Writes [value] to this adapter, unless it is the default value and can be safely omitted.
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

                override fun close() {
                  closed.set(true)
                  super.close()
                }
              }.buffer()
            }
          }
        val reader = body.charStream()
        assertThat(reader.read()).isEqualTo('h'.code)
        reader.close()
        assertThat(closed.get()).isTrue()
      }
    
      @Test
      fun sourceSeesBom() {
        val body = "efbbbf68656c6c6f".decodeHex().toResponseBody()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

            if (truncated) {
              socket.close()
            }
          } else {
            // read a frame
            val inFrame = InFrame(i, reader)
            reader.nextFrame(false, inFrame)
            inFrames.add(inFrame)
          }
        }
      }
    
      fun openSocket(): Socket = Socket("localhost", port)
    
      @Synchronized override fun close() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

      private var lastTimestampNs: Long? = null
    
      /** Confirm that the thread does not hold a lock on `lock` during the callback. */
      fun forbidLock(lock: Any) {
        forbiddenLocks.add(lock)
      }
    
      /**
       * Removes recorded events up to (and including) an event is found whose class equals [eventClass]
       * and returns it.
       */
      fun <T : ConnectionEvent> removeUpToEvent(eventClass: Class<T>): T {
        val fullEventSequence = eventSequence.toList()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  10. okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt

            }
    
            override fun onRetryChange(timeMs: Long) {
              callbacks.add(timeMs)
            }
          }
        val buffer = Buffer().writeUtf8(source)
        val reader = ServerSentEventReader(buffer, callback)
        while (reader.processNextEvent()) {
        }
        assertThat(buffer.size, "Unconsumed buffer: ${buffer.readUtf8()}")
          .isEqualTo(0)
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
Back to top