Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 57 of 57 for value1 (0.14 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/ParseResponseWithMoshi.kt

          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
          val gist = gistJsonAdapter.fromJson(response.body!!.source())
    
          for ((key, value) in gist!!.files!!) {
            println(key)
            println(value.content)
          }
        }
      }
    
      @JsonClass(generateAdapter = true)
      data class Gist(var files: Map<String, GistFile>?)
    
      @JsonClass(generateAdapter = true)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (1)
  2. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

     * The range goes until the beginning of the next range.
     *
     * When b2 and b3 are unused, their values are set to 0x2d ('-').
     *
     * Section Index (1,240 bytes)
     * ===========================
     *
     * Each entry is 4 bytes, and represents all the code points that share a 14-bit prefix. Entries are
     * sorted by this 14-bit prefix.
     *
     * We define these values:
     *
     *  * **b0b1s7**: (b0 << 14) + (b1 << 7)
     *  * **b2b3s2**: (b2 << 9) + (b3 << 2)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Apr 02 11:39:58 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/ErrorCode.kt

      COMPRESSION_ERROR(9),
    
      CONNECT_ERROR(0xa),
    
      ENHANCE_YOUR_CALM(0xb),
    
      INADEQUATE_SECURITY(0xc),
    
      HTTP_1_1_REQUIRED(0xd),
      ;
    
      companion object {
        fun fromHttp2(code: Int): ErrorCode? = values().find { it.httpCode == code }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/Dispatcher.kt

      /**
       * Returns an early guess of the next response, used for policy on how an incoming request should
       * be received. The default implementation returns an empty response. Mischievous implementations
       * can return other values to test HTTP edge cases, such as unhappy socket policies or throttled
       * request bodies.
       */
      open fun peek(): MockResponse {
        return MockResponse(socketPolicy = KeepOpen)
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt

    internal inline fun <T : Any> ResponseBody.commonConsumeSource(
      consumer: (BufferedSource) -> T,
      sizeMapper: (T) -> Int,
    ): T {
      val contentLength = contentLength()
      if (contentLength > Int.MAX_VALUE) {
        throw IOException("Cannot buffer entire body for content length: $contentLength")
      }
    
      val bytes = source().use(consumer)
      val size = sizeMapper(bytes)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  6. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

              sourceCodePoint1 = 0,
              mappedToCodePoints = listOf((1 shl 18) - 1),
            ),
          ),
        ).isEqualTo(
          InlineDelta(
            rangeStart = 0,
            codepointDelta = InlineDelta.MAX_VALUE,
          ),
        )
    
        assertThat(
          inlineDeltaOrNull(
            mappingOf(
              sourceCodePoint0 = 0,
              sourceCodePoint1 = 0,
              mappedToCodePoints = listOf(1 shl 18),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2.kt

          TYPE_PRIORITY, TYPE_RST_STREAM, TYPE_GOAWAY, TYPE_WINDOW_UPDATE -> return BINARY[flags]
        }
        val result = if (flags < FLAGS.size) FLAGS[flags]!! else BINARY[flags]
        // Special case types that have overlap flag values.
        return when {
          type == TYPE_PUSH_PROMISE && flags and FLAG_END_PUSH_PROMISE != 0 -> {
            result.replace("HEADERS", "PUSH_PROMISE") // TODO: Avoid allocation.
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
Back to top