Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 139 for type (0.14 sec)

  1. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

        assertThat(
          mergeAdjacentRanges(
            listOf(
              Mapping(0x0232, 0x0232, TYPE_MAPPED, "a".encodeUtf8()),
              Mapping(0x0233, 0x0233, TYPE_VALID, ByteString.EMPTY),
              Mapping(0x0234, 0x0236, TYPE_VALID, ByteString.EMPTY),
              Mapping(0x0237, 0x0239, TYPE_VALID, ByteString.EMPTY),
              Mapping(0x023a, 0x023a, TYPE_MAPPED, "b".encodeUtf8()),
            ),
          ),
        ).containsExactly(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/JsseDebugLogging.kt

              message.startsWith("System property ") -> Type.Setup
              message.startsWith("Reload ") -> Type.Setup
              message == "No session to resume." -> Type.Handshake
              message.startsWith("Consuming ") -> Type.Handshake
              message.startsWith("Produced ") -> Type.Handshake
              message.startsWith("Negotiated ") -> Type.Handshake
              message.startsWith("Found resumable session") -> Type.Handshake
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2.kt

      const val INITIAL_MAX_FRAME_SIZE = 0x4000 // 16384
    
      const val TYPE_DATA = 0x0
      const val TYPE_HEADERS = 0x1
      const val TYPE_PRIORITY = 0x2
      const val TYPE_RST_STREAM = 0x3
      const val TYPE_SETTINGS = 0x4
      const val TYPE_PUSH_PROMISE = 0x5
      const val TYPE_PING = 0x6
      const val TYPE_GOAWAY = 0x7
      const val TYPE_WINDOW_UPDATE = 0x8
      const val TYPE_CONTINUATION = 0x9
    
      const val FLAG_NONE = 0x0
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

     */
    internal object DnsRecordCodec {
      private const val SERVFAIL = 2
      private const val NXDOMAIN = 3
      const val TYPE_A = 0x0001
      const val TYPE_AAAA = 0x001c
      private const val TYPE_PTR = 0x000c
      private val ASCII = Charsets.US_ASCII
    
      fun encodeQuery(
        host: String,
        type: Int,
      ): ByteString =
        Buffer().apply {
          writeShort(0) // query id
          writeShort(256) // flags with recursion
    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)
  5. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

            .body(
              """
              |data: hey
              |
              |
              """.trimMargin(),
            ).setHeader("content-type", "text/plain")
            .build(),
        )
        newEventSource()
        listener.assertFailure("Invalid content-type: text/plain")
      }
    
      @Test
      fun badResponseCode() {
        server.enqueue(
          MockResponse.Builder()
            .body(
              """
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

    private const val QUOTED = "\"([^\"]*)\""
    private val TYPE_SUBTYPE = Regex("$TOKEN/$TOKEN")
    private val PARAMETER = Regex(";\\s*(?:$TOKEN=(?:$TOKEN|$QUOTED))?")
    
    /**
     * Returns a media type for this string.
     *
     * @throws IllegalArgumentException if this is not a well-formed media type.
     */
    internal fun String.commonToMediaType(): MediaType {
      val typeSubtype: MatchResult =
        TYPE_SUBTYPE.matchAtPolyfill(this, 0)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  7. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

      override fun cancel() {
        canceled = true
        call?.cancel()
      }
    
      override fun onEvent(
        id: String?,
        type: String?,
        data: String,
      ) {
        listener.onEvent(this, id, type, data)
      }
    
      override fun onRetryChange(timeMs: Long) {
        // Ignored. We do not auto-retry.
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

          constructed = pushedConstructed
          if (name != null) path.removeAt(path.size - 1)
        }
      }
    
      /**
       * Execute [block] with a new namespace for type hints. Type hints from the enclosing type are no
       * longer usable by the current type's members.
       */
      fun <T> withTypeHint(block: () -> T): T {
        typeHintStack.add(null)
        try {
          return block()
        } finally {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt

      fun run() {
        fileSystem.write(path) {
          writeUtf8("{}")
        }
    
        val request =
          Request.Builder()
            .url("https://httpbin.org/anything")
            .put(path.asRequestBody(fileSystem, MEDIA_TYPE_JSON))
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          fileSystem.sink(path).use {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

        return null // No challenges were satisfied!
      }
    
      @Throws(IOException::class)
      private fun Proxy.connectToInetAddress(
        url: HttpUrl,
        dns: Dns,
      ): InetAddress {
        return when (type()) {
          Proxy.Type.DIRECT -> dns.lookup(url.host).first()
          else -> (address() as InetSocketAddress).address
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
Back to top