Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for encodeQuery (0.43 sec)

  1. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsRecordCodecTest.kt

      fun testGoogleDotComEncoding() {
        val encoded = encodeQuery("google.com", TYPE_A)
        assertThat(encoded).isEqualTo("AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ")
      }
    
      private fun encodeQuery(
        host: String,
        type: Int,
      ): String = DnsRecordCodec.encodeQuery(host, type).base64Url().replace("=", "")
    
      @Test
      fun testGoogleDotComEncodingWithIPv6() {
        val encoded = encodeQuery("google.com", TYPE_AAAA)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu May 29 20:09:10 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  2. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

      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
            writeShort(1) // question count
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  3. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

        hostname: String,
        type: Int,
      ): Request =
        Request
          .Builder()
          .header("Accept", DNS_MESSAGE.toString())
          .apply {
            val query = DnsRecordCodec.encodeQuery(hostname, type)
    
            val dnsUrl: HttpUrl = ******@****.***
            if (post) {
              url(dnsUrl)
                .cacheUrlOverride(
                  dnsUrl
                    .newBuilder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/WebPlatformUrlTest.kt

        val effectivePort =
          when {
            url!!.port != defaultPort(url.scheme) -> Integer.toString(url.port)
            else -> ""
          }
        val effectiveQuery =
          when {
            url.encodedQuery != null -> "?" + url.encodedQuery
            else -> ""
          }
        val effectiveFragment =
          when {
            url.encodedFragment != null -> "#" + url.encodedFragment
            else -> ""
          }
        val effectiveHost =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        assertThat(request1.method).isEqualTo("GET")
        val request2 = server.takeRequest()
        assertThat(request2.method).isEqualTo("GET")
        assertThat(listOf(request1.url.encodedQuery, request2.url.encodedQuery))
          .containsExactlyInAnyOrder(
            "ct&dns=AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ",
            "ct&dns=AAABAAABAAAAAAAABmdvb2dsZQNjb20AABwAAQ",
          )
      }
    
      @Test
      fun failure() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/util/FacetResponse.java

                    final Filter queryFacet = (Filter) aggregation;
                    final String encodedQuery = queryFacet.getName().substring(Constants.FACET_QUERY_PREFIX.length());
                    queryCountMap.put(new String(BaseEncoding.base64().decode(encodedQuery), StandardCharsets.UTF_8), queryFacet.getDocCount());
                }
    
            });
        }
    
        /**
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/HttpUrl.kt

      @JvmName("-deprecated_encodedQuery")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "encodedQuery"),
        level = DeprecationLevel.ERROR,
      )
      fun encodedQuery(): String? = encodedQuery
    
      @JvmName("-deprecated_query")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "query"),
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 63.5K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

        val encodedPath: String = httpUrl.encodedPath()
        val encodedPathSegments: List<String> = httpUrl.encodedPathSegments()
        val pathSegments: List<String> = httpUrl.pathSegments()
        val encodedQuery: String? = httpUrl.encodedQuery()
        val query: String? = httpUrl.query()
        val querySize: Int = httpUrl.querySize()
        val queryParameter: String? = httpUrl.queryParameter("")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/UrlComponentEncodingTester.kt

          }
        },
    
        QUERY {
          override fun urlString(value: String): String = "http://example.com/?a${value}z"
    
          override fun encodedValue(url: HttpUrl): String {
            val query = url.encodedQuery
            return query!!.substring(1, query.length - 1)
          }
    
          override operator fun set(
            builder: HttpUrl.Builder,
            value: String,
          ) {
            builder.query("a${value}z")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val encodedPath: String = httpUrl.encodedPath
        val encodedPathSegments: List<String> = httpUrl.encodedPathSegments
        val pathSegments: List<String> = httpUrl.pathSegments
        val encodedQuery: String? = httpUrl.encodedQuery
        val query: String? = httpUrl.query
        val querySize: Int = httpUrl.querySize
        val queryParameter: String? = httpUrl.queryParameter("")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
Back to top