Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for Cannon (0.16 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

      }
    
      @Test fun `cannot decode malformed utc time`() {
        val bytes = "170d3139313231362333303231305a".decodeHex()
        assertFailsWith<ProtocolException> {
          Adapters.UTC_TIME.fromDer(bytes)
        }.also { expected ->
          assertThat(expected).hasMessage("Failed to parse UTCTime 191216#30210Z")
        }
      }
    
      @Test fun `cannot decode generalized time with offset`() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

              throw AssertionError()
            }
          }
        assertFailsWith<IOException> {
          body.bytes()
        }.also { expected ->
          assertThat(expected.message).isEqualTo(
            "Cannot buffer entire body for content length: 2147483648",
          )
        }
      }
    
      @Test
      fun byteStringEmpty() {
        val body = body("")
        assertThat(body.byteString()).isEqualTo(ByteString.EMPTY)
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Interceptor.kt

     * Implementations of this interface throw [IOException] to signal connectivity failures. This
     * includes both natural exceptions such as unreachable servers, as well as synthetic exceptions
     * when responses are of an unexpected type or cannot be decoded.
     *
     * Other exception types cancel the current call:
     *
     *  * For synchronous calls made with [Call.execute], the exception is propagated to the caller.
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  4. mockwebserver/README.md

      assertEquals("/v1/chat/messages/2", request2.getPath());
    
      RecordedRequest request3 = server.takeRequest();
      assertEquals("/v1/chat/messages/3", request3.getPath());
    
      // Shut down the server. Instances cannot be reused.
      server.shutdown();
    }
    ```
    
    Your unit tests might move the `server` into a field so you can shut it down
    from your test's `tearDown()`.
    
    ### API
    
    #### MockResponse
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     */
    fun interface Authenticator {
      /**
       * Returns a request that includes a credential to satisfy an authentication challenge in
       * [response]. Returns null if the challenge cannot be satisfied.
       *
       * The route is best effort, it currently may not always be provided even when logically
       * available. It may also not be provided when an authenticator is re-used manually in an
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

      private const val SKEW = 38
      private const val DAMP = 700
      private const val INITIAL_BIAS = 72
      private const val INITIAL_N = 0x80
    
      /**
       * Returns null if any label is oversized so much that the encoder cannot encode it without
       * integer overflow. This will not return null for labels that fit within the DNS size
       * limits.
       */
      fun encode(string: String): String? {
        var pos = 0
        val limit = string.length
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

     *
     * Otherwise, this performs IDN ToASCII encoding and canonicalize the result to lowercase. For
     * example this converts `☃.net` to `xn--n3h.net`, and `WwW.GoOgLe.cOm` to `www.google.com`.
     * `null` will be returned if the host cannot be ToASCII encoded or if the result contains
     * unsupported ASCII characters.
     */
    internal fun String.toCanonicalHost(): String? {
      val host: String = this
    
      // If the input contains a :, it’s an IPv6 address.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        request: Request,
        newRoutePlanner: Boolean,
        chain: RealInterceptorChain,
      ) {
        check(interceptorScopedExchange == null)
    
        this.withLock {
          check(!responseBodyOpen) {
            "cannot make a new request because the previous response is still open: " +
              "please call response.close()"
          }
          check(!requestBodyOpen)
        }
    
        if (newRoutePlanner) {
          val routePlanner =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  9. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt

          inflater.reset()
        }
    
        deflatedBytes.writeAll(buffer)
        deflatedBytes.writeInt(OCTETS_TO_ADD_BEFORE_INFLATION)
    
        val totalBytesToRead = inflater.bytesRead + deflatedBytes.size
    
        // We cannot read all, as the source does not close.
        // Instead, we ensure that all bytes from source have been processed by inflater.
        do {
          inflaterSource.readOrInflate(buffer, Long.MAX_VALUE)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

      }
    
      /**
       * Returns the connection already attached to the call if it's eligible for a new exchange.
       *
       * If the call's connection exists and is eligible for another exchange, it is returned. If it
       * exists but cannot be used for another exchange, it is closed and this returns null.
       */
      private fun planReuseCallConnection(): ReusePlan? {
        // This may be mutated by releaseConnectionNoEvents()!
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
Back to top