Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 69 for responseBody (0.11 sec)

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

        val code: Int = response.code()
        val message: String = response.message()
        val handshake: Handshake? = response.handshake()
        val headers: Headers = response.headers()
        val body: ResponseBody = response.body()
        val networkResponse: Response? = response.networkResponse()
        val cacheResponse: Response? = response.cacheResponse()
        val priorResponse: Response? = response.priorResponse()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Cache.kt

        }
      }
    
      private class CacheResponseBody(
        val snapshot: DiskLruCache.Snapshot,
        private val contentType: String?,
        private val contentLength: String?,
      ) : ResponseBody() {
        private val bodySource: BufferedSource
    
        init {
          val source = snapshot.getSource(ENTRY_BODY)
          bodySource =
            object : ForwardingSource(source) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  3. cmd/server_test.go

    	c.Assert(response.StatusCode, http.StatusOK)
    
    	var buffer bytes.Buffer
    	// extract the body of the response.
    	responseBody, err := io.ReadAll(response.Body)
    	c.Assert(err, nil)
    	// assert the http response body content.
    	c.Assert(true, bytes.Equal(responseBody, buffer.Bytes()))
    }
    
    func (s *TestSuiteCommon) TestBucket(c *check) {
    	// generate a random bucket name.
    	bucketName := getRandomBucketName()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 15 16:28:02 UTC 2024
    - 116.3K bytes
    - Viewed (0)
  4. okhttp-android/src/main/baseline-prof.txt

    HSPLokhttp3/Response;->close()V
    HSPLokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
    HSPLokhttp3/ResponseBody;-><init>()V
    HSPLokhttp3/ResponseBody;->close()V
    HSPLokhttp3/ResponseBody;->string()Ljava/lang/String;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Mar 21 11:22:00 UTC 2022
    - 127.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/EventListenerTest.kt

    import okhttp3.CallEvent.SecureConnectEnd
    import okhttp3.CallEvent.SecureConnectStart
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.ResponseBody.Companion.toResponseBody
    import okhttp3.internal.DoubleInetAddressDns
    import okhttp3.internal.RecordingOkAuthenticator
    import okhttp3.internal.connection.RealConnectionPool.Companion.get
    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/CallTest.kt

    import okhttp3.Headers.Companion.headersOf
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    import okhttp3.ResponseBody.Companion.asResponseBody
    import okhttp3.TestUtil.assumeNotWindows
    import okhttp3.TestUtil.awaitGarbageCollection
    import okhttp3.internal.DoubleInetAddressDns
    import okhttp3.internal.RecordingOkAuthenticator
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/CacheResponse.java

        Request request = new Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build();
    
        String response1Body;
        try (Response response1 = client.newCall(request).execute()) {
          if (!response1.isSuccessful()) throw new IOException("Unexpected code " + response1);
    
          response1Body = response1.body().string();
          System.out.println("Response 1 response:          " + response1);
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 2.4K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/CacheResponse.kt

            return@use it.body.string()
          }
    
        println("Response 2 equals Response 1? " + (response1Body == response2Body))
      }
    }
    
    fun main() {
      CacheResponse(File("CacheResponse.tmp")).run()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

      }
    
      private fun buildRequestThread(
        path: String,
        responseCode: AtomicInteger,
      ): Thread {
        return Thread {
          val url = mockWebServer.url(path).toUrl()
          val conn: HttpURLConnection
          try {
            conn = url.openConnection() as HttpURLConnection
            responseCode.set(conn.responseCode) // Force the connection to hit the "server".
          } catch (ignored: IOException) {
          }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        if (HttpMethod.permitsRequestBody(method)) {
          val responseCode = userResponse.code
          val maintainBody =
            HttpMethod.redirectsWithBody(method) ||
              responseCode == HTTP_PERM_REDIRECT ||
              responseCode == HTTP_TEMP_REDIRECT
          if (HttpMethod.redirectsToGet(method) && responseCode != HTTP_PERM_REDIRECT && responseCode != HTTP_TEMP_REDIRECT) {
            requestBuilder.method("GET", null)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:24:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
Back to top