Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for GetBody (0.09 sec)

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

        mockResponse.headers = headersOf()
        mockResponse.trailers = headersOf()
        mockResponse = mockResponse.removeHeader("")
        var body: Buffer? = mockResponse.getBody()
        mockResponse = mockResponse.setBody(Buffer())
        mockResponse = mockResponse.setChunkedBody(Buffer(), 0)
        mockResponse = mockResponse.setChunkedBody("", 0)
        var socketPolicy: SocketPolicy = mockResponse.socketPolicy
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  2. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

              .setStatus("HTTP/1.1 404")
              .addHeader("content-type: text/plain; charset=utf-8")
              .setBody("NOT FOUND: " + path);
        } catch (IOException e) {
          return new MockResponse()
              .setStatus("HTTP/1.1 500")
              .addHeader("content-type: text/plain; charset=utf-8")
              .setBody("SERVER ERROR: " + e);
        }
      }
    
      private MockResponse directoryToResponse(String basePath, File directory) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Jan 02 02:50:44 UTC 2019
    - 4.7K bytes
    - Viewed (0)
  3. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

          return new MockResponse()
              .setResponseCode(404)
              .setBody("unexpected request");
        }
    
        try {
          OAuthSession session = slackApi.exchangeCode(code, redirectUrl());
          listener.sessionGranted(session);
        } catch (IOException e) {
          return new MockResponse()
              .setResponseCode(400)
              .setBody("code exchange failed: " + e.getMessage());
        }
    
        synchronized (this) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CacheTest.kt

      }
    
      internal enum class TransferKind {
        CHUNKED {
          override fun setBody(
            response: MockResponse.Builder,
            content: Buffer,
            chunkSize: Int,
          ) {
            response.chunkedBody(content, chunkSize)
          }
        },
        FIXED_LENGTH {
          override fun setBody(
            response: MockResponse.Builder,
            content: Buffer,
            chunkSize: Int,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  5. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

        server.setServerSocketFactory(new UnixDomainServerSocketFactory(socketFile));
        server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE));
        server.enqueue(new MockResponse().setBody("hello"));
        server.start();
    
        OkHttpClient client = new OkHttpClient.Builder()
            .socketFactory(new UnixDomainSocketFactory(socketFile))
            .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Dec 24 03:46:30 UTC 2018
    - 2.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

          call.execute()
        }
      }
    
      @Test
      fun interruptReadingResponseBody() {
        val responseBodySize = 8 * 1024 * 1024 // 8 MiB.
        server.enqueue(
          MockResponse()
            .setBody(Buffer().write(ByteArray(responseBodySize)))
            .throttleBody((64 * 1024).toLong(), 125, TimeUnit.MILLISECONDS),
        ) // 500 Kbps
        server.start()
        val call =
          client.newCall(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. docs/pl/docs/features.md

    * Automatyczna dokumentacja modelu danych za pomocą <a href="https://json-schema.org/" class="external-link"...
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

          }
        }, ;
    
        abstract fun setBody(
          response: MockResponse.Builder,
          content: Buffer?,
          chunkSize: Int,
        )
    
        abstract fun newRequestBody(body: String): RequestBody
    
        fun setBody(
          response: MockResponse.Builder,
          content: String?,
          chunkSize: Int,
        ) {
          setBody(response, Buffer().writeUtf8(content!!), chunkSize)
        }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  9. docs/pl/docs/tutorial/first-steps.md

    * `@app.put()`
    * `@app.delete()`
    
    Oraz tych bardziej egzotycznych:
    
    * `@app.options()`
    * `@app.head()`
    * `@app.patch()`
    * `@app.trace()`
    
    /// tip
    
    Możesz dowolnie używać każdej operacji (metody HTTP).
    
    **FastAPI** nie narzuca żadnego konkretnego znaczenia.
    
    Informacje tutaj są przedstawione jako wskazówka, a nie wymóg.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:51:30 UTC 2024
    - 9.6K bytes
    - Viewed (0)
Back to top