Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 291 for CALL (0.14 sec)

  1. okhttp/src/main/kotlin/okhttp3/Call.kt

     */
    package okhttp3
    
    import okio.IOException
    import okio.Timeout
    
    /**
     * A call is a request that has been prepared for execution. A call can be canceled. As this object
     * represents a single request/response pair (stream), it cannot be executed twice.
     */
    interface Call : Cloneable {
      /** Returns the original request that initiated this call. */
      fun request(): Request
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

            .build()
        val latch = CountDownLatch(1)
        val exceptionRef = AtomicReference<Throwable>()
        val call = client.newCall(request)
        call.timeout().timeout(250, TimeUnit.MILLISECONDS)
        call.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              exceptionRef.set(e)
              latch.countDown()
            }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/CallConnectionUser.kt

        call.plansToCancel -= connectPlan
      }
    
      override fun updateRouteDatabaseAfterSuccess(route: Route) {
        call.client.routeDatabase.connected(route)
      }
    
      override fun connectStart(route: Route) {
        eventListener.connectStart(call, route.socketAddress, route.proxy)
        poolConnectionListener.connectStart(route, call)
      }
    
      override fun connectFailed(
        route: Route,
        protocol: Protocol?,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/ConnectionListener.kt

    @ExperimentalOkHttpApi
    abstract class ConnectionListener {
      /**
       * Invoked as soon as a call causes a connection to be started.
       */
      open fun connectStart(
        route: Route,
        call: Call,
      ) {}
    
      /**
       * Invoked when a connection fails to be established.
       */
      open fun connectFailed(
        route: Route,
        call: Call,
        failure: IOException,
      ) {}
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

              call: Call,
              e: IOException,
            ) {
              latch.countDown()
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              fail("")
            }
          },
        )
        assertThat(server.takeRequest().sequenceNumber)
          .isEqualTo(expectedSequenceNumber)
        responseDequeuedLatch!!.await()
        call.cancel()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

            localhostIpv4,
            localhostIpv6,
          )
        serverIpv4.enqueue(
          MockResponse(body = "unexpected call to IPv4"),
        )
        serverIpv6.enqueue(
          MockResponse(body = "hello from IPv6"),
        )
    
        val call = client.newCall(Request(url))
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("hello from IPv6")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  7. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

        call: Call,
        connection: Connection,
      ) {
        logWithTime("connectionReleased")
      }
    
      override fun requestHeadersStart(call: Call) {
        logWithTime("requestHeadersStart")
      }
    
      override fun requestHeadersEnd(
        call: Call,
        request: Request,
      ) {
        logWithTime("requestHeadersEnd")
      }
    
      override fun requestBodyStart(call: Call) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

        call: Call,
        connection: Connection,
      ) = logEvent(ConnectionReleased(System.nanoTime(), call, connection))
    
      override fun callStart(call: Call) = logEvent(CallStart(System.nanoTime(), call))
    
      override fun requestHeadersStart(call: Call) = logEvent(RequestHeadersStart(System.nanoTime(), call))
    
      override fun requestHeadersEnd(
        call: Call,
        request: Request,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  9. okhttp/src/main/kotlin/okhttp3/internal/http/RealInterceptorChain.kt

        check(exchange == null) { "Timeouts can't be adjusted in a network interceptor" }
    
        return copy(writeTimeoutMillis = checkDuration("writeTimeout", timeout.toLong(), unit))
      }
    
      override fun call(): Call = call
    
      override fun request(): Request = request
    
      @Throws(IOException::class)
      override fun proceed(request: Request): Response {
        check(index < interceptors.size)
    
        calls++
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            .build()
        val call = client.newCall(request1)
        assertFailsWith<SocketTimeoutException> {
          call.execute() // we want this call to throw a SocketTimeoutException
        }
      }
    
      @Test
      fun chainCanCancelCall() {
        val callRef = AtomicReference<Call>()
        val interceptor =
          Interceptor { chain: Interceptor.Chain ->
            val call = chain.call()
            callRef.set(call)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
Back to top