Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 581 for require (0.21 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

       * explicitly closed.
       */
      fun truncateLastFrame(length: Int): Http2Writer {
        val lastFrame = outFrames.removeAt(outFrames.size - 1)
        require(length < bytesOut.size - lastFrame.start)
    
        // Move everything from bytesOut into a new buffer.
        val fullBuffer = Buffer()
        bytesOut.read(fullBuffer, bytesOut.size)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

            when {
              it.sourceCodePoint1 < codePoint -> -1
              it.sourceCodePoint0 > codePoint -> 1
              else -> 0
            }
          }
    
        // Code points must be in 0..0x10ffff.
        require(index in mappings.indices) { "unexpected code point: $codePoint" }
    
        val mapping = mappings[index]
        var result = true
    
        when (mapping.type) {
          TYPE_IGNORED -> Unit
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. docs/features/events.md

    some connectivity failures. In this case, the `connectFailed()` event is not terminal and not followed by `callFailed()`. Event listeners will receive multiple events of the same type when retries are attempted.
    
    A single HTTP call may require follow-up requests to be made to handle authentication challenges, redirects, and HTTP-layer timeouts. In such cases multiple connections, requests, and responses may be attempted. Follow-ups are another reason a single call may trigger multiple events...
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

      open fun getSelectedProtocol(sslSocket: SSLSocket): String? = null
    
      /** For MockWebServer. This returns the inbound SNI names. */
      @SuppressLint("NewApi")
      @IgnoreJRERequirement // This function is overridden to require API >= 24.
      open fun getHandshakeServerNames(sslSocket: SSLSocket): List<String> {
        val session = sslSocket.session as? ExtendedSSLSession ?: return listOf()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        upstreamSize: Long,
        metadataSize: Long,
      ) {
        val header =
          Buffer().apply {
            write(prefix)
            writeLong(upstreamSize)
            writeLong(metadataSize)
            require(size == FILE_HEADER_SIZE)
          }
    
        val fileOperator = FileOperator(file!!.channel)
        fileOperator.write(0, header, FILE_HEADER_SIZE)
      }
    
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      if (address[11] != 255.toByte()) return false
    
      return true
    }
    
    /** Encodes an IPv4 address in canonical form according to RFC 4001. */
    internal fun inet4AddressToAscii(address: ByteArray): String {
      require(address.size == 4)
      return Buffer()
        .writeDecimalLong((address[0] and 0xff).toLong())
        .writeByte('.'.code)
        .writeDecimalLong((address[1] and 0xff).toLong())
        .writeByte('.'.code)
    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)
  7. docs/changelogs/changelog_4x.md

     *  Fix: Retain binary-compatibility in `okhttp3.internal.HttpMethod`. Naughty third party SDKs
        import this and we want to ease upgrades for their users.
    
    
    ## Version 4.0.0-RC2
    
    _2019-06-21_
    
     *  New: Require Kotlin 1.3.40.
     *  New: Change the Kotlin API from `File.toRequestBody()` to `File.asRequestBody()` and
        `BufferedSource.toResponseBody()` to `BufferedSource.asResponseBody()`. If the returned value
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        assertThat(parse("http://[0:0:0:0:0:0:0:0]/").host).isEqualTo("::")
        assertThat(parse("http://[::ffff:c0a8:1fe]/").host).isEqualTo("192.168.1.254")
      }
    
      /**
       * The builder permits square braces but does not require them.
       */
      @Test
      fun hostIpv6Builder() {
        val base = parse("http://example.com/")
        assertThat(base.newBuilder().host("[::1]").build().toString())
          .isEqualTo("http://[::1]/")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

      }
    
    private fun checkSupportResponse(
      name: String,
      response: Response?,
    ) {
      response?.apply {
        require(networkResponse == null) { "$name.networkResponse != null" }
        require(cacheResponse == null) { "$name.cacheResponse != null" }
        require(priorResponse == null) { "$name.priorResponse != null" }
      }
    }
    
    fun Response.Builder.commonPriorResponse(priorResponse: Response?) =
      apply {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  10. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

          writeShort(0) // additional
    
          val nameBuf = Buffer()
          val labels = host.split('.').dropLastWhile { it.isEmpty() }
          for (label in labels) {
            val utf8ByteCount = label.utf8Size()
            require(utf8ByteCount == label.length.toLong()) { "non-ascii hostname: $host" }
            nameBuf.writeByte(utf8ByteCount.toInt())
            nameBuf.writeUtf8(label)
          }
          nameBuf.writeByte(0) // end
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top