Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 111 for Inception (0.19 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

      private final OkHttpClient client;
    
      public ConfigureTimeouts() throws Exception {
        client = new OkHttpClient.Builder()
            .connectTimeout(5, TimeUnit.SECONDS)
            .writeTimeout(5, TimeUnit.SECONDS)
            .readTimeout(5, TimeUnit.SECONDS)
            .callTimeout(10, TimeUnit.SECONDS)
            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Sep 28 18:00:26 GMT 2019
    - 1.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Interceptor.kt

     *
     * Other exception types cancel the current call:
     *
     *  * For synchronous calls made with [Call.execute], the exception is propagated to the caller.
     *
     *  * For asynchronous calls made with [Call.enqueue], an [IOException] is propagated to the caller
     *    indicating that the call was canceled. The interceptor's exception is delivered to the current
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/PostFile.java

    public final class PostFile {
      public static final MediaType MEDIA_TYPE_MARKDOWN
          = MediaType.get("text/x-markdown; charset=utf-8");
    
      private final OkHttpClient client = new OkHttpClient();
    
      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();
    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)
  4. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

    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()
            .addSubjectAlternativeName("localhost")
            .build();
    
        HandshakeCertificates serverCertificates = new HandshakeCertificates.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)
  5. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

      public static final MediaType MEDIA_TYPE_MARKDOWN
          = MediaType.get("text/x-markdown; charset=utf-8");
    
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        RequestBody requestBody = new RequestBody() {
          @Override public MediaType contentType() {
            return MEDIA_TYPE_MARKDOWN;
          }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

       * Releases resources held with the request or response of [exchange]. This should be called when
       * the request completes normally or when it fails due to an exception, in which case [e] should
       * be non-null.
       *
       * If the exchange was canceled or timed out, this will wrap [e] in an exception that provides
       * that additional context. Otherwise [e] is returned as-is.
       */
      internal fun <E : IOException?> messageDone(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  7. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

          fileSystem.source(publicSuffixListDotDat).buffer().use { source ->
            while (!source.exhausted()) {
              var rule: ByteString = source.readUtf8LineStrict().toRule() ?: continue
    
              if (rule.startsWith(EXCEPTION_RULE_MARKER)) {
                rule = rule.substring(1)
                // We use '\n' for end of value.
                totalExceptionRuleBytes += rule.size + 1
                sortedExceptionRules.add(rule)
              } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  8. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt

        }
      }
    }
    
    object LoggingCallback : FutureCallback<SimpleHttpResponse> {
      override fun completed(response: SimpleHttpResponse) {
      }
    
      override fun failed(ex: Exception) {
        println("Failed: $ex")
      }
    
      override fun cancelled() {
        println("Cancelled")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

       *
       * If this does read a value, it starts with the tag and length, and reads an entire value,
       * including any potential composed values.
       *
       * If there's nothing to read and no default value, this will throw an exception.
       */
      fun fromDer(reader: DerReader): T
    
      fun fromDer(byteString: ByteString): T {
        val buffer = Buffer().write(byteString)
        val reader = DerReader(buffer)
        return fromDer(reader)
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  10. samples/static-server/src/main/java/okhttp3/sample/SampleServer.java

        if (path.endsWith(".txt")) return "text/plain; charset=utf-8";
        return "application/octet-stream";
      }
    
      public static void main(String[] args) throws Exception {
        if (args.length != 4) {
          System.out.println("Usage: SampleServer <keystore> <password> <root file> <port>");
          return;
        }
    
        String keystoreFile = args[0];
        String password = args[1];
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Jan 02 02:50:44 GMT 2019
    - 4.7K bytes
    - Viewed (0)
Back to top