Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 114 for lengthOf (0.46 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketProtocol.kt

       */
      internal const val B1_FLAG_MASK = 128
    
      /**
       * Byte 1 mask for the payload length.
       *
       * If this value is [PAYLOAD_SHORT], the next two
       * bytes represent the length. If this value is [PAYLOAD_LONG], the next eight bytes
       * represent the length.
       */
      internal const val B1_MASK_LENGTH = 127
    
      internal const val OPCODE_CONTINUATION = 0x0
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt

          // Split by line, then ensure each line can fit into Log's maximum length.
          var i = 0
          val length = logMessage.length
          while (i < length) {
            var newline = logMessage.indexOf('\n', i)
            newline = if (newline != -1) newline else length
            do {
              val end = minOf(newline, i + MAX_LOG_LENGTH)
              Log.println(logLevel, tag, logMessage.substring(i, end))
              i = end
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

      }
    
      /**
       * Either writes this request to [sink] or measures its content length. We have one method do
       * double-duty to make sure the counting and content are consistent, particularly when it comes
       * to awkward operations like measuring the encoded length of header strings, or the
       * length-in-digits of an encoded integer.
       */
      @Throws(IOException::class)
      private fun writeOrCountBytes(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/FormBody.kt

        writeOrCountBytes(sink, false)
      }
    
      /**
       * Either writes this request to [sink] or measures its content length. We have one method
       * do double-duty to make sure the counting and content are consistent, particularly when it comes
       * to awkward operations like measuring the encoded length of header strings, or the
       * length-in-digits of an encoded integer.
       */
      private fun writeOrCountBytes(
        sink: BufferedSink?,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  5. docs/features/interceptors.md

    User-Agent: OkHttp Example
    
    INFO: Received response for https://publicobject.com/helloworld.txt in 1179.7ms
    Server: nginx/1.4.6 (Ubuntu)
    Content-Type: text/plain
    Content-Length: 1759
    Connection: keep-alive
    ```
    
    We can see that we were redirected because `response.request().url()` is different from `request.url()`. The two log statements log two different URLs.
    
    ### Network Interceptors
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 8.1K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      fun setBody(body: Buffer) =
        apply {
          setHeader("Content-Length", body.size)
          this.body = body.clone() // Defensive copy.
        }
    
      fun setBody(body: String): MockResponse = setBody(Buffer().writeUtf8(body))
    
      fun setChunkedBody(
        body: Buffer,
        maxChunkSize: Int,
      ) = apply {
        removeHeader("Content-Length")
        headersBuilder.add(CHUNKED_BODY_HEADER)
    
        val bytesOut = Buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Cookie.kt

        ): Boolean {
          if (urlHost == domain) {
            return true // As in 'example.com' matching 'example.com'.
          }
    
          return urlHost.endsWith(domain) &&
            urlHost[urlHost.length - domain.length - 1] == '.' &&
            !urlHost.canParseAsIpAddress()
        }
    
        private fun pathMatch(
          url: HttpUrl,
          path: String,
        ): Boolean {
          val urlPath = url.encodedPath
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockResponseBody.kt

     *
     * Unlike [okhttp3.ResponseBody], this interface is designed to be implemented by writers and not
     * called by readers.
     */
    @ExperimentalOkHttpApi
    interface MockResponseBody {
      /** The length of this response in bytes, or -1 if unknown. */
      val contentLength: Long
    
      @Throws(IOException::class)
      fun writeTo(sink: BufferedSink)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  9. okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/Uncompress.kt

            GzipSource(body.source()).buffer()
          else -> return response
        }
    
      return response.newBuilder()
        .removeHeader("Content-Encoding")
        .removeHeader("Content-Length")
        .body(decompressedSource.asResponseBody(body.contentType(), -1))
        .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 13:19:01 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  10. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

              if (mappingIndex == -1) {
                mappingOffset = mappingsBuffer.length
                mappingsBuffer.append(mappedTo)
              } else {
                mappingOffset = mappingIndex
              }
    
              // Write the range bytes.
              val b1 = mappedTo.length
              val b2 = (mappingOffset and 0x3f80) shr 7
              val b3 = mappingOffset and 0x7f
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top