Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for throttleBody (0.08 sec)

  1. mockwebserver-deprecated/api/mockwebserver.api

    	public final fun setTrailers (Lokhttp3/Headers;)Lokhttp3/mockwebserver/MockResponse;
    	public final fun socketPolicy (Lokhttp3/mockwebserver/SocketPolicy;)V
    	public final fun status (Ljava/lang/String;)V
    	public final fun throttleBody (JJLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/MockResponse;
    	public fun toString ()Ljava/lang/String;
    	public final fun trailers (Lokhttp3/Headers;)V
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  2. mockwebserver/api/mockwebserver3.api

    	public final fun status (Ljava/lang/String;)Lmockwebserver3/MockResponse$Builder;
    	public final fun streamHandler (Lmockwebserver3/StreamHandler;)Lmockwebserver3/MockResponse$Builder;
    	public final fun throttleBody (JJLjava/util/concurrent/TimeUnit;)Lmockwebserver3/MockResponse$Builder;
    	public final fun trailers (Lokhttp3/Headers;)Lmockwebserver3/MockResponse$Builder;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 03 21:59:45 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/EventListenerTest.kt

        )
      }
    
      @Test
      fun failedDribbledCallEventSequence() {
        server.enqueue(
          MockResponse.Builder()
            .body("0123456789")
            .throttleBody(2, 100, TimeUnit.MILLISECONDS)
            .socketPolicy(DisconnectDuringResponseBody)
            .build(),
        )
        client =
          client.newBuilder()
            .protocols(listOf<Protocol>(Protocol.HTTP_1_1))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 56.9K bytes
    - Viewed (2)
  4. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

      ) {
        setUp(protocol, mockWebServer)
        val body = CharArray(4096) // 4KiB to read.
        Arrays.fill(body, 'y')
        server.enqueue(
          MockResponse.Builder()
            .body(String(body))
            .throttleBody(1024, 1, TimeUnit.SECONDS) // Slow connection 1KiB/second.
            .build(),
        )
        client =
          client.newBuilder()
            .readTimeout(Duration.ofSeconds(2))
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertThat(getResponse(Request(url)).code).isEqualTo(407)
      }
    
      @Test
      fun disconnectedConnection() {
        server.enqueue(
          MockResponse.Builder()
            .throttleBody(2, 100, TimeUnit.MILLISECONDS)
            .body("ABCD")
            .build(),
        )
        val call = client.newCall(newRequest("/"))
        val response = call.execute()
        val inputStream = response.body.byteStream()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        mockResponse.socketPolicy = SocketPolicy.KEEP_OPEN
        var http2ErrorCode: Int = mockResponse.http2ErrorCode
        mockResponse.http2ErrorCode = 0
        mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS)
        var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod
        throttleBytesPerPeriod = mockResponse.throttleBytesPerPeriod
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/CallTest.kt

      }
    
      @Test
      fun timeoutsUpdatedOnReusedConnections() {
        server.enqueue(MockResponse(body = "abc"))
        server.enqueue(
          MockResponse.Builder()
            .body("def")
            .throttleBody(1, 750, TimeUnit.MILLISECONDS)
            .build(),
        )
    
        // First request: time out after 1s.
        client =
          client.newBuilder()
            .readTimeout(Duration.ofSeconds(1))
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CacheTest.kt

      private fun testClientPrematureDisconnect(transferKind: TransferKind) {
        // Setting a low transfer speed ensures that stream discarding will time out.
        val builder =
          MockResponse.Builder()
            .throttleBody(6, 1, TimeUnit.SECONDS)
        transferKind.setBody(builder, "ABCDE\nFGHIJKLMNOPQRSTUVWXYZ", 1024)
        server.enqueue(builder.build())
        server.enqueue(
          MockResponse.Builder()
            .body("Request #2")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
Back to top