Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for amatch (0.13 sec)

  1. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

              .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) {
          listeners.remove(state);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  2. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

        ExecutorService executor = Executors.newFixedThreadPool(threadCount);
        for (int i = 0; i < threadCount; i++) {
          executor.execute(() -> {
            try {
              drainQueue();
            } catch (Exception e) {
              e.printStackTrace();
            }
          });
        }
        executor.shutdown();
      }
    
      private void drainQueue() throws Exception {
        for (HttpUrl url; (url = queue.take()) != null; ) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  3. regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java

        boolean androidMorEarlier = Build.VERSION.SDK_INT <= 23;
        try {
          sendRequest(client, "https://valid-isrgrootx1.letsencrypt.org/robots.txt");
          if (androidMorEarlier) {
            fail();
          }
        } catch (SSLHandshakeException sslhe) {
          assertTrue(androidMorEarlier);
        }
      }
    
      @Test public void getPassesAdditionalCert() throws IOException, CertificateException {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Nov 17 07:40:31 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/CancelCall.java

        try (Response response = call.execute()) {
          System.out.printf("%.2f Call was expected to fail, but completed: %s%n",
              (System.nanoTime() - startNanos) / 1e9f, response);
        } catch (IOException e) {
          System.out.printf("%.2f Call failed as expected: %s%n",
              (System.nanoTime() - startNanos) / 1e9f, e);
        }
      }
    
      public static void main(String... args) throws Exception {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.1K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/PerCallSettings.java

            .readTimeout(500, TimeUnit.MILLISECONDS)
            .build();
        try (Response response = client1.newCall(request).execute()) {
          System.out.println("Response 1 succeeded: " + response);
        } catch (IOException e) {
          System.out.println("Response 1 failed: " + e);
        }
    
        // Copy to customize OkHttp for this request.
        OkHttpClient client2 = client.newBuilder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.9K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

                System.out.println(i);
                Thread.sleep(10);
                sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i)));
              }
              sink.close();
            } catch (IOException | InterruptedException e) {
              e.printStackTrace();
            }
          }
    
          private String factor(int n) {
            for (int i = 2; i < n; i++) {
              int x = n / i;
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 3.1K bytes
    - Viewed (0)
Back to top