Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 92 for 500 (0.14 sec)

  1. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

            .throttleBody((64 * 1024).toLong(), 125, TimeUnit.MILLISECONDS),
        ) // 500 Kbps
        server.start()
        val call =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        val response = call.execute()
        interruptLater(500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt

    fun formatDuration(ns: Long): String {
      val s =
        when {
          ns <= -999_500_000 -> "${(ns - 500_000_000) / 1_000_000_000} s "
          ns <= -999_500 -> "${(ns - 500_000) / 1_000_000} ms"
          ns <= 0 -> "${(ns - 500) / 1_000} µs"
          ns < 999_500 -> "${(ns + 500) / 1_000} µs"
          ns < 999_500_000 -> "${(ns + 500_000) / 1_000_000} ms"
          else -> "${(ns + 500_000_000) / 1_000_000_000} s "
        }
      return String.format("%6s", s)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

        client =
          client.newBuilder()
            .callTimeout(250, TimeUnit.MILLISECONDS)
            .build()
        server.enqueue(
          MockResponse.Builder()
            .bodyDelay(500, TimeUnit.MILLISECONDS)
            .setHeader("content-type", "text/event-stream")
            .body("data: hey\n\n")
            .build(),
        )
        val source = newEventSource()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/DuplexTest.kt

      }
    
      @Test
      fun fullCallTimeoutAppliesToSetup() {
        enableProtocol(Protocol.HTTP_2)
        server.enqueue(
          MockResponse.Builder()
            .headersDelay(500, TimeUnit.MILLISECONDS)
            .build(),
        )
        val request =
          Request.Builder()
            .url(server.url("/"))
            .post(AsyncRequestBody())
            .build()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

              Buffer()
                .write(ByteArray(responseBodySize)),
            )
            .throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps
            .build(),
        )
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        cancelLater(call, 500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
        assertFailsWith<IOException> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  6. docs/en/docs/img/deployment/https/https01.drawio

                        </mxGeometry>
                    </mxCell>
                    <mxCell id="33" value="" style="group" parent="1" vertex="1" connectable="0">
                        <mxGeometry x="-140" y="-75" width="500" height="350" as="geometry"/>
                    </mxCell>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 6.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

      }
    
      @Test
      fun timeoutWritingRequest() {
        server.enqueue(MockResponse())
        val request =
          Request.Builder()
            .url(server.url("/"))
            .post(sleepingRequestBody(500))
            .build()
        val call = client.newCall(request)
        call.timeout().timeout(250, TimeUnit.MILLISECONDS)
        assertFailsWith<IOException> {
          call.execute()
        }.also { expected ->
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/middleware.md

    ```Python hl_lines="2  6"
    {!../../../docs_src/advanced_middleware/tutorial003.py!}
    ```
    
    The following arguments are supported:
    
    * `minimum_size` - Do not GZip responses that are smaller than this minimum size in bytes. Defaults to `500`.
    
    ## Other middlewares
    
    There are many other ASGI middlewares.
    
    For example:
    
    * <a href="https://docs.sentry.io/platforms/python/guides/fastapi/" class="external-link" target="_blank">Sentry</a>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 10 18:27:10 GMT 2023
    - 4K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

      private val serverListener = WebSocketRecorder("server")
      private val random = Random(0)
      private var client =
        clientTestRule.newClientBuilder()
          .writeTimeout(Duration.ofMillis(500))
          .readTimeout(Duration.ofMillis(500))
          .addInterceptor(
            Interceptor { chain: Interceptor.Chain ->
              val response = chain.proceed(chain.request())
              // Ensure application interceptors never see a null body.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  10. mockwebserver/README.md

    testing everything. You can even copy & paste HTTP responses from your real web
    server to create representative test cases. Or test that your code survives in
    awkward-to-reproduce situations like 500 errors or slow-loading responses.
    
    
    ### Example
    
    Use MockWebServer the same way that you use mocking frameworks like
    [Mockito](https://github.com/mockito/mockito):
    
    1. Script the mocks.
    2. Run application code.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
Back to top