Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for append (0.32 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

          logger.log(
            buildString {
              append("<-- ${response.code}")
              if (response.message.isNotEmpty()) append(" ${response.message}")
              append(" ${redactUrl(response.request.url)} (${tookMs}ms")
              if (!logHeaders) append(", $bodySize body")
              append(")")
            },
          )
    
          if (logHeaders) {
            val headers = response.headers
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        StringBuilder response = new StringBuilder();
        response.append(String.format("<html><head><title>%s</title></head><body>", basePath));
        response.append(String.format("<h1>%s</h1>", basePath));
        for (String file : directory.list()) {
          response.append(String.format("<div class='file'><a href='%s'>%s</a></div>",
              basePath + file, file));
        }
        response.append("</body></html>");
    
        return new MockResponse()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

            upstreamBuffer.copyTo(sink, 0, bytesRead)
            sourcePos += bytesRead
    
            // Append the upstream bytes to the file.
            fileOperator!!.write(
              FILE_HEADER_SIZE + upstreamPos,
              upstreamBuffer.clone(),
              upstreamBytesRead,
            )
    
            synchronized(this@Relay) {
              // Append new upstream bytes into the buffer. Trim it to its max size.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val result = StringBuilder()
        for (i in 0 until count) {
          val value = inputStream.read()
          if (value == -1) {
            inputStream.close()
            break
          }
          result.append(value.toChar())
        }
        return result.toString()
      }
    
      @Test
      fun markAndResetWithContentLengthHeader() {
        testMarkAndReset(TransferKind.FIXED_LENGTH)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt

     *  * `com.twitter.hpack.HuffmanDecoder`
     *  * `com.twitter.hpack.HpackUtil`
     *
     * [twitter_hpack]: https://github.com/twitter/hpack
     */
    object Huffman {
      // Appendix C: Huffman Codes
      // http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-12#appendix-B
      private val CODES =
        intArrayOf(
          0x1ff8, 0x7fffd8, 0xfffffe2, 0xfffffe3, 0xfffffe4, 0xfffffe5, 0xfffffe6,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/Certificates.kt

      return buildString {
        append("-----BEGIN CERTIFICATE-----\n")
        encodeBase64Lines(encoded.toByteString())
        append("-----END CERTIFICATE-----\n")
      }
    }
    
    internal fun StringBuilder.encodeBase64Lines(data: ByteString) {
      val base64 = data.base64()
      for (i in 0 until base64.length step 64) {
        append(base64, i, minOf(i + 64, base64.length)).append('\n')
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (2)
  7. okhttp/src/test/java/okhttp3/UrlComponentEncodingTesterJvm.kt

      fun escapeForUri(vararg codePoints: Int) =
        apply {
          uriEscapedCodePoints.append(String(*codePoints))
        }
    
      /**
       * Configure code points to be stripped in conversion to `java.net.URI`. That class is more
       * strict than the others.
       */
      fun stripForUri(vararg codePoints: Int) =
        apply {
          uriStrippedCodePoints.append(String(*codePoints))
        }
    
      override fun test(
        codePoint: Int,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

          // The names are repetitive so re-use the same builder to avoid allocations.
          val fileBuilder = StringBuilder(key).append('.')
          val truncateTo = fileBuilder.length
          for (i in 0 until valueCount) {
            fileBuilder.append(i)
            cleanFiles += directory / fileBuilder.toString()
            fileBuilder.append(".tmp")
            dirtyFiles += directory / fileBuilder.toString()
            fileBuilder.setLength(truncateTo)
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/WebPlatformToAsciiTest.kt

          "xn--a.ß",
          "xn--a.xn--zca",
          "xn--a-yoc",
          // OkHttp doesn't reject U+FFFD encoded in Punycode.
          "xn--zn7c.com",
          // OkHttp doesn't reject a U+200D. https://www.rfc-editor.org/rfc/rfc5892.html#appendix-A.2
          "xn--1ug.example",
          // OkHttp doesn't implement CheckJoiners.
          "\u200D.example",
          // OkHttp doesn't implement CheckBidi.
          "يa",
        )
    
      @Test
      fun test() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  10. docs/security/tls_configuration_history.md

    [googlecloud_ssl_policy]: https://cloud.google.com/load-balancing/docs/ssl-policies-concepts
    [http2_denylist]: https://tools.ietf.org/html/rfc7540#appendix-A
    [http2_naughty]: #http2_naughty
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 9K bytes
    - Viewed (0)
Back to top