Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 87 for secunds (0.14 sec)

  1. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

        "--connect-timeout",
        help = "Maximum time allowed for connection (seconds)",
      ).int().default(DEFAULT_TIMEOUT)
    
      val readTimeout: Int by option("--read-timeout", help = "Maximum time allowed for reading data (seconds)").int().default(DEFAULT_TIMEOUT)
    
      val callTimeout: Int by option(
        "--call-timeout",
        help = "Maximum time allowed for the entire call (seconds)",
      ).int().default(DEFAULT_TIMEOUT)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (1)
  2. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

            .connectTimeout(5, TimeUnit.SECONDS)
            .writeTimeout(5, TimeUnit.SECONDS)
            .readTimeout(5, TimeUnit.SECONDS)
            .callTimeout(10, TimeUnit.SECONDS)
            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build();
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Sep 28 18:00:26 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

          .isCloseTo(now.toDouble(), deltaMillis)
        assertThat(certificate.notAfter.time.toDouble())
          .isCloseTo(now.toDouble() + durationMillis, deltaMillis)
      }
    
      @Test
      fun customInterval() {
        // 5 seconds starting on 1970-01-01.
        val heldCertificate =
          HeldCertificate.Builder()
            .validityInterval(5000L, 10000L)
            .build()
        val certificate = heldCertificate.certificate
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  4. mockwebserver/README.md

        .setBody("{}");
    ```
    
    MockResponse can be used to simulate a slow network. This is useful for
    testing timeouts and interactive testing.
    
    ```java
    response.throttleBody(1024, 1, TimeUnit.SECONDS);
    ```
    
    
    #### RecordedRequest
    
    Verify requests by their method, path, HTTP version, body, and headers.
    
    ```java
    RecordedRequest request = server.takeRequest();
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  5. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        assertThat(Adapters.parseGeneralizedTime("19920622123421Z"))
          .isEqualTo(date("1992-06-22T12:34:21.000+0000").time)
      }
    
      @Disabled("fractional seconds are not implemented")
      @Test
      fun `parse generalized time with fractional seconds`() {
        assertThat(Adapters.parseGeneralizedTime("19920722132100.3Z"))
          .isEqualTo(date("1992-07-22T13:21:00.300+0000").time)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

          " cipherSuite=${handshake?.cipherSuite ?: "none"}" +
          " protocol=$protocol}"
      }
    
      companion object {
        const val IDLE_CONNECTION_HEALTHY_NS = 10_000_000_000 // 10 seconds.
    
        fun newTestConnection(
          taskRunner: TaskRunner,
          connectionPool: RealConnectionPool,
          route: Route,
          socket: Socket,
          idleAtNs: Long,
        ): RealConnection {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

              },
            )
            .writeTimeout(Duration.ofMillis(500))
            .build()
        server.start()
        server.enqueue(
          MockResponse.Builder()
            .throttleBody(1, 1, TimeUnit.SECONDS)
            .build(),
        ) // Prevent the server from reading!
        val request =
          Request(
            url = server.url("/"),
            body =
              object : RequestBody() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt

     * entire response body. If and when the client makes a subsequent request using a pooled socket the
     * server may not have had time to close the socket. The socket will be closed at an indeterminate
     * point before or during the second request. It may be closed after client has started sending the
     * request body. If a request body is not retryable then the client may fail the request, making
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CacheControlJvmTest.kt

      @Throws(Exception::class)
      fun completeBuilder() {
        val cacheControl =
          CacheControl.Builder()
            .noCache()
            .noStore()
            .maxAge(1, TimeUnit.SECONDS)
            .maxStale(2, TimeUnit.SECONDS)
            .minFresh(3, TimeUnit.SECONDS)
            .onlyIfCached()
            .noTransform()
            .immutable()
            .build()
        assertThat(cacheControl.toString()).isEqualTo(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    @file:Suppress("ktlint:standard:filename")
    
    package okhttp3.internal
    
    import kotlin.time.Duration.Companion.seconds
    import okhttp3.CacheControl
    import okhttp3.Headers
    
    internal fun CacheControl.commonToString(): String {
      var result = headerValue
      if (result == null) {
        result =
          buildString {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 7.2K bytes
    - Viewed (0)
Back to top