Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for RecordedResponse (0.19 sec)

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

       */
      fun priorResponse(): RecordedResponse {
        val priorResponse = response!!.priorResponse!!
        return RecordedResponse(priorResponse.request, priorResponse, null, null, null)
      }
    
      /**
       * Asserts that the current response used the network and returns the network response.
       */
      fun networkResponse(): RecordedResponse {
        val networkResponse = response!!.networkResponse!!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/RecordingCallback.kt

        while (true) {
          val i = responses.iterator()
          while (i.hasNext()) {
            val recordedResponse = i.next()
            if (recordedResponse.request.url.equals(url)) {
              i.remove()
              return recordedResponse
            }
          }
          val nowMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime())
          if (nowMillis >= timeoutMillis) break
          (this as Object).wait(timeoutMillis - nowMillis)
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

      }
    
      private fun executeSynchronously(request: Request): RecordedResponse {
        val call = client.newCall(request)
        return try {
          val response = call.execute()
          val bodyString = response.body.string()
          RecordedResponse(request, response, null, bodyString, null)
        } catch (e: IOException) {
          RecordedResponse(request, null, null, null, e)
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            .url(server.url("/"))
            .build()
        val call = client.newCall(request)
        call.enqueue(callback)
        val recordedResponse = callback.await(server.url("/"))
        assertThat(recordedResponse.failure, "canceled due to java.lang.RuntimeException: boom!")
        recordedResponse.failure!!.assertSuppressed { throwables: List<Throwable>? ->
          assertThat(throwables!!).contains(boom)
          Unit
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CallTest.kt

      }
    
      private fun executeSynchronously(request: Request): RecordedResponse {
        val call = client.newCall(request)
        return try {
          val response = call.execute()
          val bodyString = response.body.string()
          RecordedResponse(request, response, null, bodyString, null)
        } catch (e: IOException) {
          RecordedResponse(request, null, null, null, e)
        }
      }
    
      /**
    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)
Back to top