Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for responseDone (0.06 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/Exchange.kt

          }
        }
        if (responseDone) {
          if (e != null) {
            eventListener.responseFailed(call, e)
          } else {
            eventListener.responseBodyEnd(call, bytesRead)
          }
        }
        return call.messageDone(
          exchange = this,
          requestDone = requestDone,
          responseDone = responseDone,
          e = e,
        )
      }
    
      fun noRequestBody() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 22:04:11 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

        exchange: Exchange,
        requestDone: Boolean = false,
        responseDone: Boolean = false,
        e: IOException?,
      ): IOException? {
        if (exchange != this.exchange) return e // This exchange was detached violently!
    
        var bothStreamsDone = false
        var callDone = false
        withLock {
          if (requestDone && requestBodyOpen || responseDone && responseBodyOpen) {
            if (requestDone) requestBodyOpen = false
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  3. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

      }
    
      private fun buildRequestThread(
        path: String,
        responseCode: AtomicInteger,
      ): Thread =
        Thread {
          val url = mockWebServer.url(path).toUrl()
          val conn: HttpURLConnection
          try {
            conn = url.openConnection() as HttpURLConnection
            responseCode.set(conn.responseCode) // Force the connection to hit the "server".
          } catch (ignored: IOException) {
          }
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt

      // HEAD requests never yield a body regardless of the response headers.
      if (request.method == "HEAD") {
        return false
      }
    
      val responseCode = code
      if ((responseCode < HTTP_CONTINUE || responseCode >= 200) &&
        responseCode != HTTP_NO_CONTENT &&
        responseCode != HTTP_NOT_MODIFIED
      ) {
        return true
      }
    
      // If the Content-Length or Transfer-Encoding headers disagree with the response code, the
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  5. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

              + " over "
              + response.protocol()
              + ")") : "(cache)";
          int responseCode = response.code();
    
          System.out.printf("%03d: %s %s%n", responseCode, url, responseSource);
    
          String contentType = response.header("Content-Type");
          if (responseCode != 200 || contentType == null) {
            return;
          }
    
          MediaType mediaType = MediaType.parse(contentType);
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jul 23 00:58:06 UTC 2025
    - 5K bytes
    - Viewed (0)
  6. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

        buf.readShort() // query id
    
        val flags = buf.readShort().toInt() and 0xffff
        require(flags shr 15 != 0) { "not a response" }
    
        val responseCode = flags and 0xf
    
        if (responseCode == NXDOMAIN) {
          throw UnknownHostException("$hostname: NXDOMAIN")
        } else if (responseCode == SERVFAIL) {
          throw UnknownHostException("$hostname: SERVFAIL")
        }
    
        val questionCount = buf.readShort().toInt() and 0xffff
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        if (HttpMethod.permitsRequestBody(method)) {
          val responseCode = userResponse.code
          val maintainBody =
            HttpMethod.redirectsWithBody(method) ||
              responseCode == HTTP_PERM_REDIRECT ||
              responseCode == HTTP_TEMP_REDIRECT
          if (HttpMethod.redirectsToGet(method) && responseCode != HTTP_PERM_REDIRECT && responseCode != HTTP_TEMP_REDIRECT) {
            requestBuilder.method("GET", null)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:58:02 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  8. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        val url = server.url("/").toUrl()
        val connection = url.openConnection() as HttpURLConnection
        assertThat(connection.responseCode).isEqualTo(HttpURLConnection.HTTP_OK)
        val refusedConnection = url.openConnection() as HttpURLConnection
        assertFailsWith<ConnectException> {
          refusedConnection.responseCode
        }.also { expected ->
          assertThat(expected.message!!).contains("refused")
        }
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Aug 03 22:38:00 UTC 2025
    - 28K bytes
    - Viewed (0)
  9. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

        val text =
          conn.inputStream.use {
            it.bufferedReader().readText()
          }
    
        assertEquals(200, conn.responseCode)
    
        assertTrue(text.contains("Disallow"))
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

              .hostnameVerifier(hostnameVerifier)
              .build()
        }
        val responseOne =
          MockResponse
            .Builder()
            .addHeader("Content-Encoding: gzip")
        transferKind.setBody(responseOne, gzip("one (gzipped)"), 5)
        server.enqueue(responseOne.build())
        val responseTwo = MockResponse.Builder()
        transferKind.setBody(responseTwo, "two (identity)", 5)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
Back to top