Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for encodeQuery (0.05 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 Dec 26 11:42:13 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 Dec 26 11:42:13 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 Dec 26 11:42:13 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 Dec 26 11:42:13 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 Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 11.9K 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: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Sun Nov 23 11:39:05 UTC 2025
    - 5.3K 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 Dec 26 11:42:13 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 Dec 26 11:42:13 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 Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RequestLine.kt

       * URL is. Includes the query component if it exists.
       */
      fun requestPath(url: HttpUrl): String {
        val path = url.encodedPath
        val query = url.encodedQuery
        return if (query != null) "$path?$query" else path
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Jun 17 00:47:36 UTC 2025
    - 1.9K bytes
    - Viewed (0)
Back to top