Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for heder (0.17 sec)

  1. okhttp-java-net-cookiejar/src/main/kotlin/okhttp3/java/net/cookiejar/JavaNetCookieJar.kt

       */
      private fun decodeHeaderAsJavaNetCookies(
        url: HttpUrl,
        header: String,
      ): List<Cookie> {
        val result = mutableListOf<Cookie>()
        var pos = 0
        val limit = header.length
        var pairEnd: Int
        while (pos < limit) {
          pairEnd = header.delimiterOffset(";,", pos, limit)
          val equalsSign = header.delimiterOffset('=', pos, pairEnd)
    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)
  2. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        @JvmField var streamId = 0
    
        @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)
  3. docs/changelogs/changelog_4x.md

        The upcoming Android Studio runs in a JVM but has classes from Android and that confused OkHttp!
    
     *  Fix: Include the header `Accept: text/event-stream` for SSE calls. This header is not added if
        the request already contains an `Accept` header.
    
     *  Fix: Don't crash with a `NullPointerException` if a server sends a close while we're sending a
        ping. OkHttp had a race condition bug.
    
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

      @JvmStatic
      fun createFactory(callFactory: Call.Factory): EventSource.Factory {
        return EventSource.Factory { request, listener ->
          val actualRequest =
            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:18:15 GMT 2024
    - 1.6K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/CallTest.kt

        // Make a range request.
        val request =
          Request.Builder()
            .url(server.url("/"))
            .header("Range", "bytes=0-")
            .build()
        val call = client.newCall(request)
    
        // The response is not decompressed.
        val response = call.execute()
        assertThat(response.header("Content-Encoding")).isEqualTo("gzip")
        assertThat(response.body.source().readByteString()).isEqualTo(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

         * ```
         *
         * The file is newline separated. The first two lines are the URL and the request method. Next
         * is the number of HTTP Vary request header lines, followed by those lines.
         *
         * Next is the response status line, followed by the number of HTTP response header lines,
         * followed by those lines.
         *
         * HTTPS responses also contain SSL session information. This begins with a blank line, and then
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              nextRequest = route.address.proxyAuthenticator.authenticate(route, response)
                ?: throw IOException("Failed to authenticate with proxy")
    
              if ("close".equals(response.header("Connection"), ignoreCase = true)) {
                return nextRequest
              }
            }
    
            else -> throw IOException("Unexpected response code for CONNECT: ${response.code}")
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  8. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        extraNetworkInterceptor =
          Interceptor { chain: Interceptor.Chain ->
            chain.proceed(
              chain.request()
                .newBuilder()
                .header("Content-Length", "2")
                .header("Content-Type", "text/plain-ish")
                .build(),
            )
          }
        server.enqueue(MockResponse())
        client.newCall(
          request()
            .post("Hi?".toRequestBody(PLAIN))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Request.kt

        open fun url(url: URL) = url(url.toString().toHttpUrl())
    
        /**
         * Sets the header named [name] to [value]. If this request already has any headers
         * with that name, they are all replaced.
         */
        open fun header(
          name: String,
          value: String,
        ) = commonHeader(name, value)
    
        /**
         * Adds a header with [name] and [value]. Prefer this method for multiply-valued
         * headers like "Cookie".
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

          ProtocolException::class.java,
          "Expected 'Sec-WebSocket-Accept' header value 'ujmZX4KXZqjwy6vi1aQFH5p4Ygk=' but was 'magic'",
        )
        webSocket.cancel()
      }
    
      @Test
      @Throws(IOException::class)
      fun clientIncludesForbiddenHeader() {
        newWebSocket(
          Request.Builder()
            .url(webServer.url("/"))
            .header("Sec-WebSocket-Extensions", "permessage-deflate")
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
Back to top