Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for Create (0.26 sec)

  1. samples/tlssurvey/src/main/kotlin/okhttp3/survey/ssllabs/SslLabsScrape.kt

      private val moshiConverterFactory = MoshiConverterFactory.create(moshi)
    
      private val retrofit =
        Retrofit.Builder()
          .baseUrl(SslLabsService.BASE_URL)
          .addConverterFactory(moshiConverterFactory)
          .callFactory(callFactory)
          .build()
    
      private val api = retrofit.create(SslLabsService::class.java)
    
      suspend fun query(): List<Client> {
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  2. docs/features/events.md

    This [sample factory](https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java) creates a unique ID for each call and uses that ID to differentiate calls in log messages.
    
    ```java
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  3. mockwebserver/README.md

    1. Script the mocks.
    2. Run application code.
    3. Verify that the expected requests were made.
    
    Here's a complete example:
    
    ```java
    public void test() throws Exception {
      // Create a MockWebServer. These are lean enough that you can create a new
      // instance for every unit test.
      MockWebServer server = new MockWebServer();
    
      // Schedule some responses.
      server.enqueue(new MockResponse().setBody("hello, world!"));
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  4. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

          ).decodeHex()
        serverWriter.writeMessageFrame(OPCODE_BINARY, payload)
        assertData("8232")
        assertData(payload)
      }
    
      @Test fun serverMessageLengthShort() {
        // Create a payload which will overflow the normal payload byte size.
        val payload = Buffer()
        while (payload.completeSegmentByteCount() <= PAYLOAD_BYTE_MAX) {
          payload.writeByte('0'.code)
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/PostFile.java

      public void run() throws Exception {
        File file = new File("README.md");
    
        Request request = new Request.Builder()
            .url("https://api.github.com/markdown/raw")
            .post(RequestBody.create(file, MEDIA_TYPE_MARKDOWN))
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat May 25 18:02:55 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

    import okhttp3.Response;
    import okhttp3.mockwebserver.MockResponse;
    import okhttp3.mockwebserver.MockWebServer;
    import okhttp3.tls.HandshakeCertificates;
    import okhttp3.tls.HeldCertificate;
    
    /**
     * Create an HTTPS server with a self-signed certificate that OkHttp trusts.
     */
    public class HttpsServer {
      public void run() throws Exception {
        HeldCertificate localhostCertificate = new HeldCertificate.Builder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 02 14:04:37 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/OkHttp.kt

       * headers.
       *
       * Official OkHttp releases follow [semantic versioning][semver]. Versions with the `-SNAPSHOT`
       * qualifier are not unique and should only be used in development environments. If you create
       * custom builds of OkHttp please include a qualifier your version name, like "4.7.0-mycompany.3".
       * The version string is configured in the root project's `build.gradle`.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.6K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt

          object : DeferredSocketAdapter.Factory {
            override fun matchesSocket(sslSocket: SSLSocket): Boolean {
              return BouncyCastlePlatform.isSupported && sslSocket is BCSSLSocket
            }
    
            override fun create(sslSocket: SSLSocket): SocketAdapter = BouncyCastleSocketAdapter()
          }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        private const val FILE_HEADER_SIZE = 32L
    
        /**
         * Creates a new relay that reads a live stream from [upstream], using [file] to share that data
         * with other sources.
         *
         * **Warning:** callers to this method must immediately call [newSource] to create a source and
         * close that when they're done. Otherwise a handle to [file] will be leaked.
         */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt

     * share the same [Address] may share a [Connection]. This class implements the policy
     * of which connections to keep open for future use.
     *
     * @constructor Create a new connection pool with tuning parameters appropriate for a single-user
     * application. The tuning parameters in this pool are subject to change in future OkHttp releases.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 20:39:41 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top