Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 187 for body (0.13 sec)

  1. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

          MockResponse.Builder()
            .body(
              Buffer()
                .write(ByteArray(responseBodySize)),
            )
            .throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps
            .build(),
        )
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        cancelLater(call, 500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/InterceptorTest.kt

          MockResponse.Builder()
            .body("abc")
            .throttleBody(1, 1, TimeUnit.SECONDS)
            .build(),
        )
        val request1 =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val call = client.newCall(request1)
        val response = call.execute()
        val body = response.body
        assertFailsWith<SocketTimeoutException> {
          body.string()
        }
      }
    
      @Test
    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)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

              logger.log("--> END ${request.method} (encoded body omitted)")
            } else if (requestBody.isDuplex()) {
              logger.log("--> END ${request.method} (duplex request body omitted)")
            } else if (requestBody.isOneShot()) {
              logger.log("--> END ${request.method} (one-shot body omitted)")
            } else {
              var buffer = Buffer()
              requestBody.writeTo(buffer)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  4. tensorflow/c/c_api_function.cc

    }
    
    // Populates `body_nodes` with the nodes that will become function's body.
    // Performs various checks.
    Status ComputeBodyNodes(
        const TF_Graph* fn_body, const char* fn_name, int num_opers,
        const TF_Operation* const* opers,
        const std::unordered_map<const Node*, std::vector<int>>& input_nodes,
        std::vector<const Node*>* body_nodes)
        TF_EXCLUSIVE_LOCKS_REQUIRED(fn_body->mu) {
      if (num_opers == -1) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 13.6K bytes
    - Viewed (2)
  5. internal/event/target/elasticsearch.go

    	res, err := c.Indices.ResolveIndex([]string{args.Index})
    	if err != nil {
    		return err
    	}
    	defer res.Body.Close()
    
    	var v map[string]interface{}
    	found := false
    	if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
    		return fmt.Errorf("Error parsing response body: %v", err)
    	}
    
    	indices, ok := v["indices"].([]interface{})
    	if ok {
    		for _, index := range indices {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 15K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          }
    
        fun body(body: Buffer) = body(body.toMockResponseBody())
    
        fun body(body: MockResponseBody) =
          apply {
            setHeader("Content-Length", body.contentLength)
            this.body = body
          }
    
        /** Sets the response body to the UTF-8 encoded bytes of [body]. */
        fun body(body: String): Builder = body(Buffer().writeUtf8(body))
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  7. tests/test_tutorial/test_body/test_tutorial001_py310.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture
    def client():
        from docs_src.body.tutorial001_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_body_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (2)
  8. tests/test_tutorial/test_body/test_tutorial001.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture
    def client():
        from docs_src.body.tutorial001 import app
    
        client = TestClient(app)
        return client
    
    
    def test_body_float(client: TestClient):
        response = client.post("/items/", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (7)
  9. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

        state = STATE_READING_RESPONSE_BODY
        return FixedLengthSource(length)
      }
    
      private fun newChunkedSource(url: HttpUrl): Source {
        check(state == STATE_OPEN_RESPONSE_BODY) { "state: $state" }
        state = STATE_READING_RESPONSE_BODY
        return ChunkedSource(url)
      }
    
      private fun newUnknownLengthSource(): Source {
        check(state == STATE_OPEN_RESPONSE_BODY) { "state: $state" }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  10. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        applicationLogs
          .assertLogEqual("--> POST $url (3-byte body)")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, 0-byte body\)"""))
          .assertNoMoreLogs()
        networkLogs
          .assertLogEqual("--> POST $url http/1.1 (3-byte body)")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, 0-byte body\)"""))
          .assertNoMoreLogs()
      }
    
      @Test
      fun basicResponseBody() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
Back to top