Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 39 of 39 for subheader (0.14 sec)

  1. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val response =
          MockResponse()
            .clearHeaders()
            .addHeader("Cookie: s=square")
            .addHeader("Cookie: a=android")
            .addHeader("Cookies: delicious")
        response.setHeader("cookie", "r=robot")
        assertThat(headersToList(response))
          .containsExactly("Cookies: delicious", "cookie: r=robot")
      }
    
      @Test
      fun mockResponseSetHeaders() {
        val response =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        val builder =
          MockResponse.Builder()
            .clearHeaders()
            .addHeader("Cookie: s=square")
            .addHeader("Cookie: a=android")
            .addHeader("Cookies: delicious")
        builder.setHeader("cookie", "r=robot")
        assertThat(headersToList(builder)).containsExactly("Cookies: delicious", "cookie: r=robot")
      }
    
      @Test
      fun mockResponseSetHeaders() {
        val builder =
          MockResponse.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        sink: BufferedSink,
        request: RecordedRequest,
        response: MockResponse,
      ) {
        val key = request.headers["Sec-WebSocket-Key"]
        val webSocketResponse =
          response.newBuilder()
            .setHeader("Sec-WebSocket-Accept", WebSocketProtocol.acceptHeader(key!!))
            .build()
        writeHttpResponse(socket, sink, webSocketResponse)
    
        // Adapt the request and response into our Request and Response domain model.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        mockResponse = mockResponse.addHeader("")
        mockResponse = mockResponse.addHeader("", "")
        mockResponse = mockResponse.addHeaderLenient("", Any())
        mockResponse = mockResponse.setHeader("", Any())
        mockResponse.headers = headersOf()
        mockResponse.trailers = headersOf()
        mockResponse = mockResponse.removeHeader("")
        var body: Buffer? = mockResponse.getBody()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/EventListenerTest.kt

        assertThat(recordedEvents).doesNotContain("DnsEnd")
      }
    
      @Test
      fun multipleDnsLookupsForSingleCall() {
        server.enqueue(
          MockResponse.Builder()
            .code(301)
            .setHeader("Location", "http://www.fakeurl:" + server.port)
            .build(),
        )
        server.enqueue(MockResponse())
        val dns = FakeDns()
        dns["fakeurl"] = client.dns.lookup(server.hostName)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 56.9K bytes
    - Viewed (2)
  6. okhttp/src/test/java/okhttp3/CacheTest.kt

          // because of the retry. We just want to ensure the initial 408 isn't cached.
          expectedResponseCode = 200
          server.enqueue(
            MockResponse.Builder()
              .setHeader("Cache-Control", "no-store")
              .body("FGHIJ")
              .build(),
          )
        }
        server.start()
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

      fun head(
        protocol: Protocol,
        mockWebServer: MockWebServer,
      ) {
        setUp(protocol, mockWebServer)
        val mockResponse =
          MockResponse.Builder()
            .setHeader("Content-Length", 5)
            .status("HTTP/1.1 200")
            .build()
        server.enqueue(mockResponse)
        val call =
          client.newCall(
            Request.Builder()
              .head()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun contentDisagreesWithContentLengthHeaderBodyTooShort() {
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .setHeader("Content-Length", "5")
            .socketPolicy(DisconnectAtEnd)
            .build(),
        )
        assertFailsWith<ProtocolException> {
          val response = getResponse(newRequest("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CallTest.kt

       * https://github.com/square/okhttp/issues/5727
       */
      @Test
      fun proxyUpgradeFailsWithTruncatedResponse() {
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .setHeader("Content-Length", "5")
            .socketPolicy(DisconnectAtEnd)
            .build(),
        )
        val hostnameVerifier = RecordingHostnameVerifier()
        client =
          client.newBuilder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top