Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for encodeQuery (0.32 sec)

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

    class DnsRecordCodecTest {
      @Test
      fun testGoogleDotComEncoding() {
        val encoded = encodeQuery("google.com", TYPE_A)
        assertThat(encoded).isEqualTo("AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ")
      }
    
      private fun encodeQuery(
        host: String,
        type: Int,
      ): String {
        return DnsRecordCodec.encodeQuery(host, type).base64Url().replace("=", "")
      }
    
      @Test
      fun testGoogleDotComEncodingWithIPv6() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/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 =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.7K bytes
    - Viewed (0)
  4. 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());
                }
    
            });
        }
    
        public boolean hasFacetResponse() {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  5. okhttp/src/main/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
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
Back to top