Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Live (0.13 sec)

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

        e: IOException,
      )
    
      /**
       * Called when the HTTP response was successfully returned by the remote server. The callback may
       * proceed to read the response body with [Response.body]. The response is still live until its
       * response body is [closed][ResponseBody]. The recipient of the callback may consume the response
       * body on another thread.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ResponseJvmTest.kt

        assertThat(response.trailers()).isEmpty()
      }
    
      @Test
      fun testFailsIfTrailersNotSet() {
        val response =
          newResponse("".toResponseBody()) {
            // All live paths (Http1, Http2) in OkHttp do this
            trailers { error("trailers not available") }
          }
    
        assertFailsWith<IllegalStateException>(message = "trailers not available") {
          response.trailers()
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

          }
        };
    
        thread.start();
      }
    
      /**
       * This request body makes it possible for another thread to stream data to the uploading request.
       * This is potentially useful for posting live event streams like video capture. Callers should
       * write to {@code sink()} and close it to complete the post.
       */
      static final class PipeBody extends RequestBody {
        private final Pipe pipe = new Pipe(8192);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     * should give up.
     *
     * When reactive authentication is requested by an origin web server, the response code is 401
     * and the implementation should respond with a new request that sets the "Authorization" header.
     *
     * ```java
     * if (response.request().header("Authorization") != null) {
     *   return null; // Give up, we've already failed to authenticate.
     * }
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/Authenticate.kt

              override fun authenticate(
                route: Route?,
                response: Response,
              ): Request? {
                if (response.request.header("Authorization") != null) {
                  return null // Give up, we've already attempted to authenticate.
                }
    
                println("Authenticating for response: $response")
                println("Challenges: ${response.challenges()}")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

        while (pos < limit) {
          var dot = string.indexOf('.', startIndex = pos)
          if (dot == -1) dot = limit
    
          if (!encodeLabel(string, pos, dot, result)) {
            // If we couldn't encode the label, give up.
            return null
          }
    
          if (dot < limit) {
            result.writeByte('.'.code)
            pos = dot + 1
          } else {
            break
          }
        }
    
        return result.readUtf8()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

        val responseA = client.newCall(requestA).execute()
    
        assertThat(responseA.body.string()).isEqualTo("a")
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
    
        // Give the socket a chance to become stale.
        connection!!.idleAtNs -= IDLE_CONNECTION_HEALTHY_NS
        Thread.sleep(250)
    
        val requestB =
          Request(
            url = server.url("/"),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  8. docs/security/tls_configuration_history.md

     * **REMOVED:** ~~TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA~~
    
    
    [OkHttp 3.5][OkHttp35]
    ----------------------
    
    _2016-11-30_
    
    Remove three old cipher suites and add five new ones. This tracks changes in what's available on
    Android and Java, and also what cipher suites recent releases of Chrome and Firefox support by
    default.
    
    ##### MODERN_TLS / COMPATIBLE_TLS cipher suites
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 9K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/Authenticate.java

      public Authenticate() {
        client = new OkHttpClient.Builder()
            .authenticator((route, response) -> {
              if (response.request().header("Authorization") != null) {
                return null; // Give up, we've already attempted to authenticate.
              }
    
              System.out.println("Authenticating for response: " + response);
              System.out.println("Challenges: " + response.challenges());
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/MediaType.kt

        val charset = parameter("charset") ?: return defaultValue
        return try {
          Charset.forName(charset)
        } catch (_: IllegalArgumentException) {
          defaultValue // This charset is invalid or unsupported. Give up.
        }
      }
    
      /**
       * Returns the parameter [name] of this media type, or null if this media type does not define
       * such a parameter.
       */
      fun parameter(name: String): String? = commonParameter(name)
    
    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)
Back to top