Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for assertBody (0.18 sec)

  1. okhttp/src/test/java/okhttp3/CallTest.kt

            .url(server.url("/"))
            .head()
            .build()
        executeSynchronously(headRequest)
          .assertCode(200)
          .assertHeader("Content-Encoding", "chunked")
          .assertBody("")
        val getRequest = Request(server.url("/"))
        executeSynchronously(getRequest)
          .assertCode(200)
          .assertBody("abc")
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

              assertSuccessful()
              assertCode(200)
    
              assertThat(server2.requestCount).isEqualTo(1)
            } else {
              this.assertFailure(SocketTimeoutException::class.java)
            }
          }
    
        println("\n\nRequest to ${server2.inetSocketAddress}")
        executeSynchronously(request)
          .assertSuccessful()
          .assertCode(200)
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue May 14 17:48:07 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/RecordedResponse.kt

      ) = apply {
        assertThat(response!!.headers(name)).containsExactly(*values)
      }
    
      fun assertHeaders(headers: Headers) =
        apply {
          assertThat(response!!.headers).isEqualTo(headers)
        }
    
      fun assertBody(expectedBody: String) =
        apply {
          assertThat(body).isEqualTo(expectedBody)
        }
    
      fun assertHandshake() =
        apply {
          val handshake = response!!.handshake!!
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/InterceptorTest.kt

                      .build()
                  try {
                    val callbackA = RecordingCallback()
                    client.newCall(requestA).enqueue(callbackA)
                    callbackA.await(requestA.url).assertBody("a")
                  } catch (e: Exception) {
                    throw RuntimeException(e)
                  }
                }
                chain.proceed(chain.request())
              },
            )
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 27.8K bytes
    - Viewed (0)
Back to top