Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 74 for responseCode (0.34 seconds)

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

        shouldWriteToCache: Boolean,
        responseCode: Int,
        method: String = "GET",
      ) {
        var expectedResponseCode = responseCode
        val server = MockWebServer()
        val builder =
          MockResponse
            .Builder()
            .addHeader("Last-Modified: " + formatDate(-1, TimeUnit.HOURS))
            .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS))
            .code(responseCode)
            .body("ABCDE")
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Oct 03 17:41:45 GMT 2025
    - 116.8K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

              .hostnameVerifier(hostnameVerifier)
              .build()
        }
        val responseOne =
          MockResponse
            .Builder()
            .addHeader("Content-Encoding: gzip")
        transferKind.setBody(responseOne, gzip("one (gzipped)"), 5)
        server.enqueue(responseOne.build())
        val responseTwo = MockResponse.Builder()
        transferKind.setBody(responseTwo, "two (identity)", 5)
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat Jun 21 20:36:35 GMT 2025
    - 133.2K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt

     *
     * ```java
     * Call call = client.newCall(request);
     * call.enqueue(new Callback() {
     *   public void onResponse(Call call, Response response) throws IOException {
     *     try (ResponseBody responseBody = response.body()) {
     *     ... // Use the response.
     *     }
     *   }
     *
     *   public void onFailure(Call call, IOException e) {
     *   ... // Handle the failure.
     *   }
     * });
     * ```
     *
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue May 27 14:51:25 GMT 2025
    - 11.6K bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/Exchange.kt

          }
        }
        if (responseDone) {
          if (e != null) {
            call.eventListener.responseFailed(call, e)
          } else {
            call.eventListener.responseBodyEnd(call, bytesRead)
          }
        }
        return call.messageDone(
          exchange = this,
          requestDone = requestDone && !isSocket,
          responseDone = responseDone && !isSocket,
          socketSinkDone = requestDone && isSocket,
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Nov 05 18:28:35 GMT 2025
    - 10.5K bytes
    - Click Count (0)
  5. docs/de/docs/tutorial/response-status-code.md

    <img src="/img/tutorial/response-status-code/image01.png">
    
    /// note | Hinweis
    
    Einige Responsecodes (siehe nächsten Abschnitt) kennzeichnen, dass die Response keinen Body hat.
    
    FastAPI erkennt dies und erstellt eine OpenAPI-Dokumentation, die zeigt, dass es keinen Responsebody gibt.
    
    ///
    
    ## Über HTTP-Statuscodes { #about-http-status-codes }
    
    /// note | Hinweis
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 4.9K bytes
    - Click Count (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/ResponseJvmTest.kt

     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEmpty
    import assertk.assertions.isEqualTo
    import kotlin.test.assertFailsWith
    import okhttp3.ResponseBody.Companion.asResponseBody
    import okhttp3.ResponseBody.Companion.toResponseBody
    import okio.Buffer
    import okio.BufferedSource
    import okio.Source
    import okio.Timeout
    import okio.buffer
    import org.junit.jupiter.api.Test
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Mon Jul 07 18:57:05 GMT 2025
    - 2.8K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/ResponseCommonTest.kt

      }
    
      private fun newResponse(
        responseBody: ResponseBody,
        code: Int = 200,
      ): Response =
        Response
          .Builder()
          .request(
            Request
              .Builder()
              .url("https://example.com/")
              .build(),
          ).protocol(Protocol.HTTP_1_1)
          .code(code)
          .message("OK")
          .body(responseBody)
          .build()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.6K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt

          val responseBody = response.body.source()
          assertThat(responseBody.readUtf8Line())
            .isEqualTo("response A")
          assertThat(responseBody.readUtf8Line())
            .isEqualTo("response B")
          requestBody.writeUtf8("request C\n")
          requestBody.close()
          assertThat(responseBody.readUtf8Line()).isNull()
        }
        body.awaitSuccess()
      }
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 25.8K bytes
    - Click Count (0)
  9. tests/test_additional_responses_router.py

        },
    )
    async def c():
        return "c"
    
    
    @router.get(
        "/d",
        responses={
            "400": {"description": "Error with str"},
            "5XX": {"model": ResponseModel},
            "default": {"model": ResponseModel},
        },
    )
    async def d():
        return "d"
    
    
    app.include_router(router)
    
    
    client = TestClient(app)
    
    
    def test_a():
        response = client.get("/a")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 5.1K bytes
    - Click Count (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingResponseBody.kt

     * limitations under the License.
     */
    package okhttp3
    
    import okio.BufferedSource
    
    open class ForwardingResponseBody(
      delegate: ResponseBody?,
    ) : ResponseBody() {
      private val delegate: ResponseBody
    
      fun delegate(): ResponseBody = delegate
    
      override fun contentType(): MediaType? = delegate.contentType()
    
      override fun contentLength(): Long = delegate.contentLength()
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 1.2K bytes
    - Click Count (0)
Back to Top