Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 192 for null (0.13 sec)

  1. okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt

        assertThat(callbacks.remove()).isEqualTo(Event(null, null, "third event"))
      }
    
      @Test
      fun nakedFieldNames() {
        consumeEvents(
          """
          |data
          |
          |data
          |data
          |
          |data:
          |
          """.trimMargin(),
        )
        assertThat(callbacks.remove()).isEqualTo(Event(null, null, ""))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     *         .header("Proxy-Authorization", "secret")
     *         .build();
     *   }
     * }
     * return null; // Didn't find a preemptive auth scheme.
     * ```
     *
     * ## Reactive Authentication
     *
     * Implementations authenticate by returning a follow-up request that includes an authorization
     * header, or they may decline the challenge by returning null. In this case the unauthenticated
     * response will be returned to the caller that triggered it.
     *
    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)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

       */
      fun takeEvent(
        eventClass: Class<out ConnectionEvent>? = null,
        elapsedMs: Long = -1L,
      ): ConnectionEvent {
        val result = eventSequence.remove()
        val actualElapsedNs = result.timestampNs - (lastTimestampNs ?: result.timestampNs)
        lastTimestampNs = result.timestampNs
    
        if (eventClass != null) {
          assertThat(result).isInstanceOf(eventClass)
        }
    
        if (elapsedMs != -1L) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        @JvmField var associatedStreamId = 0
    
        @JvmField var errorCode: ErrorCode? = null
    
        @JvmField var windowSizeIncrement: Long = 0
    
        @JvmField var headerBlock: List<Header>? = null
    
        @JvmField var data: ByteArray? = null
    
        @JvmField var settings: Settings? = null
    
        @JvmField var ack = false
    
        @JvmField var payload1 = 0
    
        @JvmField var payload2 = 0
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  5. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

        tag: Long,
        forceConstructed: Boolean? = null,
      ): BasicDerAdapter<T> {
        val codec =
          object : BasicDerAdapter.Codec<T> {
            override fun decode(reader: DerReader): T = fromDer(reader)
    
            override fun encode(
              writer: DerWriter,
              value: T,
            ) {
              toDer(writer, value)
              if (forceConstructed != null) {
                writer.constructed = forceConstructed
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt

              id = source.readUtf8LineStrict().takeIf { it.isNotEmpty() }
            }
    
            in 10..12 -> {
              id = null // 'id' on a line of its own.
            }
    
            in 13..14 -> {
              type = source.readUtf8LineStrict().takeIf { it.isNotEmpty() }
            }
    
            in 15..17 -> {
              type = null // 'event' on a line of its own
            }
    
            in 18..19 -> {
              val retryMs = source.readRetryMs()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/RequestBodyTest.kt

        }
      }
    
      private inline fun <T> assertOnFileDescriptor(
        content: String? = null,
        fn: (FileDescriptor) -> T,
      ): T {
        return assertOnPath(content) {
          FileInputStream(filePath.toFile()).use { fis ->
            fn(fis.fd)
          }
        }
      }
    
      private inline fun <T> assertOnPath(
        content: String? = null,
        fn: (okio.Path) -> T,
      ): T {
        FileSystem.SYSTEM.write(filePath) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt

          if (child == null) {
            child = Node()
            children[childIndex] = child
          }
          node = child
        }
    
        val shift = 8 - accumulatorBitCount
        val start = (code shl shift) and 0xff
        val end = 1 shl shift
        node.children!!.fill(terminal, start, start + end)
      }
    
      private class Node {
        /** Null if terminal. */
        val children: Array<Node?>?
    
    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)
  9. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

            return emptyList()
          }
    
        var cookies: MutableList<Cookie>? = null
        for ((key, value) in cookieHeaders) {
          if (("Cookie".equals(key, ignoreCase = true) || "Cookie2".equals(key, ignoreCase = true)) &&
            value.isNotEmpty()
          ) {
            for (header in value) {
              if (cookies == null) cookies = mutableListOf()
              cookies.addAll(decodeHeaderAsJavaNetCookies(url, header))
            }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:10:43 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

            "b4495fb4376",
        )
      }
    
      @Test fun serverEmptyClose() {
        serverWriter.writeClose(0, null)
        assertData("8800")
      }
    
      @Test fun serverCloseWithCode() {
        serverWriter.writeClose(1001, null)
        assertData("880203e9")
      }
    
      @Test fun serverCloseWithCodeAndReason() {
        serverWriter.writeClose(1001, "Hello".encodeUtf8())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top