Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for peekBody (0.07 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/ResponseJvmTest.kt

      }
    
      @Test fun peekAfterReadingResponse() {
        val response = newResponse(responseBody("abc"))
        assertThat(response.body.string()).isEqualTo("abc")
    
        assertFailsWith<IllegalStateException> {
          response.peekBody(3)
        }
      }
    
      /**
       * Returns a new response body that refuses to be read once it has been closed. This is true of
       * most [BufferedSource] instances, but not of [Buffer].
       */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 18:57:05 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val header: String? = response.header("")
        val headers: Headers = response.headers
        val trailers: Headers = response.trailers()
        val peekBody: ResponseBody = response.peekBody(0L)
        val body: ResponseBody = response.body
        val builder: Response.Builder = response.newBuilder()
        val redirect: Boolean = response.isRedirect
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

       *
       * **Warning:** this method loads the requested bytes into memory. Most applications should set
       * a modest limit on `byteCount`, such as 1 MiB.
       */
      @Throws(IOException::class)
      fun peekBody(byteCount: Long): ResponseBody {
        val peeked = body.source().peek()
        val buffer = Buffer()
        peeked.request(byteCount)
        buffer.write(peeked, minOf(byteCount, peeked.buffer.size))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  4. okhttp/api/jvm/okhttp.api

    	public final fun isSuccessful ()Z
    	public final fun message ()Ljava/lang/String;
    	public final fun networkResponse ()Lokhttp3/Response;
    	public final fun newBuilder ()Lokhttp3/Response$Builder;
    	public final fun peekBody (J)Lokhttp3/ResponseBody;
    	public final fun peekTrailers ()Lokhttp3/Headers;
    	public final fun priorResponse ()Lokhttp3/Response;
    	public final fun protocol ()Lokhttp3/Protocol;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  5. okhttp/api/android/okhttp.api

    	public final fun isSuccessful ()Z
    	public final fun message ()Ljava/lang/String;
    	public final fun networkResponse ()Lokhttp3/Response;
    	public final fun newBuilder ()Lokhttp3/Response$Builder;
    	public final fun peekBody (J)Lokhttp3/ResponseBody;
    	public final fun peekTrailers ()Lokhttp3/Headers;
    	public final fun priorResponse ()Lokhttp3/Response;
    	public final fun protocol ()Lokhttp3/Protocol;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
Back to top