Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for street (0.18 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/RealStream.kt

     */
    package mockwebserver3.internal.duplex
    
    import mockwebserver3.Stream
    import okhttp3.internal.http2.ErrorCode
    import okhttp3.internal.http2.Http2Stream
    import okio.buffer
    
    /** Adapt OkHttp's internal [Http2Stream] type to the public [Stream] type. */
    internal class RealStream(
      private val http2Stream: Http2Stream,
    ) : Stream {
      override val requestBody = http2Stream.getSource().buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 31 18:24:52 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  2. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

        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 {
            connect(callFactory)
          }
        }
      }
    
      @JvmStatic
      fun processResponse(
    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)
  3. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        if (path.endsWith(".gif")) return "image/gif";
        if (path.endsWith(".html")) return "text/html; charset=utf-8";
        if (path.endsWith(".txt")) return "text/plain; charset=utf-8";
        return "application/octet-stream";
      }
    
      public static void main(String[] args) throws Exception {
        if (args.length != 4) {
          System.out.println("Usage: SampleServer <keystore> <password> <root file> <port>");
          return;
        }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
  4. mockwebserver/README.md

    from your test's `tearDown()`.
    
    ### API
    
    #### MockResponse
    
    Mock responses default to an empty response body and a `200` status code.
    You can set a custom body with a string, input stream or byte array. Also
    add headers with a fluent builder API.
    
    ```java
    MockResponse response = new MockResponse()
        .addHeader("Content-Type", "application/json; charset=utf-8")
        .addHeader("Cache-Control", "no-cache")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  5. okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt

        assertThat(callbacks.remove()).isEqualTo(Event(null, "add", "113411"))
      }
    
      @Test
      fun commentsIgnored() {
        consumeEvents(
          """
          |: test stream
          |
          |data: first event
          |id: 1
          |
          |
          """.trimMargin(),
        )
        assertThat(callbacks.remove()).isEqualTo(Event("1", null, "first event"))
      }
    
      @Test
    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)
  6. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        }
    
        override fun rstStream(
          streamId: Int,
          errorCode: ErrorCode,
        ) {
          check(type == -1)
          this.type = Http2.TYPE_RST_STREAM
          this.streamId = streamId
          this.errorCode = errorCode
        }
    
        override fun ping(
          ack: Boolean,
          payload1: Int,
          payload2: Int,
        ) {
          check(type == -1)
    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)
  7. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        // Confirm that the connection pool was not corrupted by making another call.
        makeSimpleCall()
      }
    
      /**
       * If the server returns a full response, it doesn't really matter if the HTTP/2 stream is reset.
       * Attempts to write the request body fails fast.
       */
      @Test
      fun serverTruncatesRequestHttp2OnDuplexRequest() {
        enableProtocol(Protocol.HTTP_2)
    
        server.enqueue(
          MockResponse(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  8. docs/contribute/concurrency.md

    available, we need to hold that thread until either the bytes arrive, the stream is closed, or a timeout elapses. If we get bytes but there's nobody asking for them, we buffer them. We don't consider bytes as delivered for flow control until they're consumed by the application.
    
    Consider an application streaming a video over http/2. Perhaps the user pauses the video and the application stops reading bytes from this stream. The buffer will fill up, and flow control prevents the server from sending...
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  9. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt

        server.enqueue(
          MockResponse.Builder()
            .body(
              """
              |data: hey
              |
              |
              """.trimMargin(),
            ).setHeader("content-type", "text/event-stream")
            .build(),
        )
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val response = client.newCall(request).execute()
        processResponse(response, listener)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/FlowControlListener.kt

     * limitations under the License.
     */
    package okhttp3.internal.http2
    
    import okhttp3.internal.http2.flowcontrol.WindowCounter
    
    interface FlowControlListener {
      /**
       * Notification that the receiving stream flow control window has changed.
       * [WindowCounter] generally carries the client view of total and acked bytes.
       */
      fun receivingStreamWindowChanged(
        streamId: Int,
        windowCounter: WindowCounter,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top