Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for onResponse (0.08 sec)

  1. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

      constructor(response: Response, listener: EventSourceListener) : this(null, response.request, listener)
    
      @Volatile private var canceled = false
    
      override fun onResponse(
        call: Call,
        response: Response,
      ) {
        processResponse(response)
      }
    
      internal fun processResponse(response: Response) {
        response.use {
          if (!response.isSuccessful) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt

          object : Callback {
            override fun onFailure(
              call: Call,
              e: okio.IOException,
            ) {
              callFailure.complete(e)
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
            }
          },
        )
    
        // This should fail the Call, but not cause an unhandled Exception bubbling up
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

            var signalledCallback = false
            timeout.enter()
            try {
              val response = getResponseWithInterceptorChain()
              signalledCallback = true
              responseCallback.onResponse(this@RealCall, response)
            } catch (e: IOException) {
              if (signalledCallback) {
                // Do not signal the callback twice!
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  4. docs/recipes.md

                .build()
    
            client.newCall(request).enqueue(object : Callback {
              override fun onFailure(call: Call, e: IOException) {
                e.printStackTrace()
              }
    
              override fun onResponse(call: Call, response: Response) {
                response.use {
                  if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
                  for ((name, value) in response.headers) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/opensearch/client/SearchEngineClient.java

         */
        public void refresh(final String... indices) {
            client.admin().indices().prepareRefresh(indices).execute(new ActionListener<RefreshResponse>() {
                @Override
                public void onResponse(final RefreshResponse response) {
                    if (logger.isDebugEnabled()) {
                        logger.debug(() -> "Refreshed " + stream(indices).get(stream -> stream.collect(Collectors.joining(", "))));
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sun Aug 31 08:19:00 UTC 2025
    - 121.9K bytes
    - Viewed (1)
Back to top