Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for encodeQuery (0.21 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-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

        }
      }
    
      private fun buildRequest(
        hostname: String,
        type: Int,
      ): Request =
        Request.Builder().header("Accept", DNS_MESSAGE.toString()).apply {
          val query = DnsRecordCodec.encodeQuery(hostname, type)
    
          if (post) {
            url(url)
              .cacheUrlOverride(
                url.newBuilder()
                  .addQueryParameter("hostname", hostname).build(),
              )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  4. cmd/signature-v2.go

    		return cred, ErrSignatureDoesNotMatch
    	}
    	return cred, ErrNone
    }
    
    // Escape encodedQuery string into unescaped list of query params, returns error
    // if any while unescaping the values.
    func unescapeQueries(encodedQuery string) (unescapedQueries []string, err error) {
    	for _, query := range strings.Split(encodedQuery, "&") {
    		var unescapedQuery string
    		unescapedQuery, err = url.QueryUnescape(query)
    		if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.2K bytes
    - Viewed (0)
  5. 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)
  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());
                }
    
            });
        }
    
        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)
  7. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

      )
      fun pathSegments(): List<String> = pathSegments
    
      @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",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  8. cmd/signature-v4.go

    	)
    
    	// Add missing query parameters if any provided in the request URL
    	for k, v := range req.Form {
    		if !defaultSigParams.Contains(k) {
    			query[k] = v
    		}
    	}
    
    	// Get the encoded query.
    	encodedQuery := query.Encode()
    
    	// Verify if date query is same.
    	if req.Form.Get(xhttp.AmzDate) != query.Get(xhttp.AmzDate) {
    		return ErrSignatureDoesNotMatch
    	}
    	// Verify if expires query is same.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/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")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  10. 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