Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 56 for trailers (0.1 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

          }
    
          sleepNanos(response.headersDelayNanos)
          stream.writeHeaders(response.toHttp2Headers(), outFinished, flushHeaders)
    
          if (trailers.size > 0) {
            stream.enqueueTrailers(trailers)
          }
          pushPromises(stream, request, response.pushPromises)
          if (body != null) {
            sleepNanos(bodyDelayNanos)
            val responseBodySink =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        var trailers: Headers = mockResponse.trailers
        mockResponse = mockResponse.clearHeaders()
        mockResponse = mockResponse.addHeader("")
        mockResponse = mockResponse.addHeader("", "")
        mockResponse = mockResponse.addHeaderLenient("", Any())
        mockResponse = mockResponse.setHeader("", Any())
        mockResponse.headers = headersOf()
        mockResponse.trailers = headersOf()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Response.kt

        level = DeprecationLevel.ERROR,
      )
      fun headers(): Headers = headers
    
      /**
       * Returns the trailers after the HTTP response, which may be empty. It is an error to call this
       * before the entire HTTP response body has been consumed.
       */
      @Throws(IOException::class)
      fun trailers(): Headers = trailersFn()
    
      /**
       * Peeks up to [byteCount] bytes from the response body and returns them as a new response
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jul 06 09:38:30 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

      for (pushPromise in pushPromises) {
        result.addPush(pushPromise.wrap())
      }
    
      result.settings(settings)
      result.status = status
      result.headers(headers)
      result.trailers(trailers)
      result.socketPolicy =
        when (socketPolicy) {
          SocketPolicy.EXPECT_CONTINUE, SocketPolicy.CONTINUE_ALWAYS -> {
            result.add100Continue()
            KeepOpen
          }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/ExchangeCodec.kt

      fun reportedContentLength(response: Response): Long
    
      @Throws(IOException::class)
      fun openResponseBodySource(response: Response): Source
    
      /** Returns the trailers after the HTTP response. May be empty. */
      @Throws(IOException::class)
      fun trailers(): Headers
    
      /**
       * Cancel this stream. Resources held by this stream will be cleaned up, though not synchronously.
       * That may happen later by the connection pool thread.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt

      /**
       * Process the response without even attempting to reading the request body. For HTTP/2 this will
       * send [http2ErrorCode] after the response body or trailers. For HTTP/1 this will close the
       * socket after the response body or trailers.
       */
      class DoNotReadRequestBody(
        val http2ErrorCode: Int = 0,
      ) : SocketPolicy
    
      /** Don't trust the client during the SSL handshake. */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/DuplexTest.kt

            .sendResponse("ok")
            .exhaustResponse()
        server.enqueue(
          MockResponse.Builder()
            .clearHeaders()
            .addHeader("h1", "v1")
            .addHeader("h2", "v2")
            .trailers(headersOf("trailers", "boom"))
            .streamHandler(body)
            .build(),
        )
        val call =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        assertThat(stream.takeHeaders()).isEqualTo(headersOf("headers", "bam"))
        connection.writePingAndAwaitPong()
        assertThat(stream.trailers()).isEqualTo(headersOf("trailers", "boom"))
        assertThat(connection.openStreamCount()).isEqualTo(0)
    
        // Verify the peer received what was expected.
        val synStream = peer.takeFrame()
        assertThat(synStream.type).isEqualTo(Http2.TYPE_HEADERS)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 75.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

        } catch (e: IOException) {
          eventListener.responseFailed(call, e)
          trackFailure(e)
          throw e
        }
      }
    
      @Throws(IOException::class)
      fun trailers(): Headers = codec.trailers()
    
      @Throws(SocketException::class)
      fun newWebSocketStreams(): RealWebSocket.Streams {
        call.timeoutEarlyExit()
        return (codec.carrier as RealConnection).newWebSocketStreams(this)
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http1/HeadersReader.kt

      fun readLine(): String {
        val line = source.readUtf8LineStrict(headerLimit)
        headerLimit -= line.length.toLong()
        return line
      }
    
      /** Reads headers or trailers. */
      fun readHeaders(): Headers {
        val result = Headers.Builder()
        while (true) {
          val line = readLine()
          if (line.isEmpty()) break
          result.addLenient(line)
        }
        return result.build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 1.4K bytes
    - Viewed (0)
Back to top