Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 323 for Enqueue (0.09 sec)

  1. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/InsecureForHostTest.kt

      }
    
      @Test fun `untrusted host in insecureHosts connects successfully`() {
        val serverCertificates = platform.localhostHandshakeCertificates()
        server.useHttps(serverCertificates.sslSocketFactory())
        server.enqueue(MockResponse())
    
        val clientCertificates =
          HandshakeCertificates.Builder()
            .addPlatformTrustedCertificates()
            .addInsecureHost(server.hostName)
            .build()
    
        val client =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. mockwebserver/README.md

      // instance for every unit test.
      MockWebServer server = new MockWebServer();
    
      // Schedule some responses.
      server.enqueue(new MockResponse().setBody("hello, world!"));
      server.enqueue(new MockResponse().setBody("sup, bra?"));
      server.enqueue(new MockResponse().setBody("yo dog"));
    
      // Start the server.
      server.start();
    
      // Ask the server for its URL. You'll need this to make HTTP requests.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Dec 17 15:34:10 UTC 2023
    - 5K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        }
      }
    
      @Test
      fun none() {
        server.enqueue(MockResponse())
        client.newCall(request().build()).execute()
        applicationLogs.assertNoMoreLogs()
        networkLogs.assertNoMoreLogs()
      }
    
      @Test
      fun basicGet() {
        setLevel(Level.BASIC)
        server.enqueue(MockResponse())
        client.newCall(request().build()).execute()
        applicationLogs
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 06 09:14:38 UTC 2024
    - 37.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/WebSocket.kt

       * that enqueued messages were not transmitted.
       */
      fun queueSize(): Long
    
      /**
       * Attempts to enqueue `text` to be UTF-8 encoded and sent as a the data of a text (type `0x1`)
       * message.
       *
       * This method returns true if the message was enqueued. Messages that would overflow the outgoing
       * message buffer will be rejected and trigger a [graceful shutdown][close] of this web socket.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt

            .heldCertificate(certificate, intermediateCa.certificate)
            .build()
        server.useHttps(serverHandshakeCertificates.sslSocketFactory())
    
        // The request should complete successfully.
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .build(),
        )
        val call1 =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Call.kt

       *
       * @throws IllegalStateException when the call has already been executed.
       */
      fun enqueue(responseCallback: Callback)
    
      /** Cancels the request, if possible. Requests that are already complete cannot be canceled. */
      fun cancel()
    
      /**
       * Returns true if this call has been either [executed][execute] or [enqueued][enqueue]. It is an
       * error to execute a call more than once.
       */
      fun isExecuted(): Boolean
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

              handshakeCertificates.trustManager,
            )
            .retryOnConnectionFailure(false)
            .build()
        url = server.url("/")
      }
    
      @Test
      fun get() {
        assumeNotWindows()
        server.enqueue(
          MockResponse.Builder()
            .body("Hello!")
            .setHeader("Content-Type", PLAIN)
            .build(),
        )
        val response = client.newCall(request().build()).execute()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

        setUp(mode)
        val responseBodySize = 8 * 1024 * 1024 // 8 MiB.
        server.enqueue(
          MockResponse.Builder()
            .body(
              Buffer()
                .write(ByteArray(responseBodySize)),
            )
            .throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps
            .build(),
        )
        server.enqueue(MockResponse(body = "."))
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt

              handshakeCertificates.sslSocketFactory(),
              handshakeCertificates.trustManager,
            )
            .proxy(server.toProxyAddress())
            .build()
    
        server.enqueue(MockResponse(inTunnel = true))
        server.enqueue(MockResponse())
    
        val call =
          client.newCall(
            Request(
              url =
                server.url("/").newBuilder()
                  .host(hostnameOrIpAddress)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.9K bytes
    - Viewed (0)
Back to top