Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for esbuild (0.21 sec)

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

      public final int port;
    
      public SlackApi(String clientId, String clientSecret, int port) {
        this.httpClient = new OkHttpClient.Builder()
            .build();
        this.moshi = new Moshi.Builder()
            .add(new SlackJsonAdapters())
            .build();
        this.clientId = clientId;
        this.clientSecret = clientSecret;
        this.port = port;
      }
    
      /** See https://api.slack.com/docs/oauth. */
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 19:30:55 GMT 2018
    - 4.4K bytes
    - Viewed (1)
  2. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

            .addTrustedCertificate(localhostCertificate.certificate())
            .build();
        OkHttpClient client = new OkHttpClient.Builder()
            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
            .build();
    
        Call call = client.newCall(new Request.Builder()
            .url(server.url("/"))
            .build());
        Response response = call.execute();
    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)
  3. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

            .readTimeout(5, TimeUnit.SECONDS)
            .callTimeout(10, TimeUnit.SECONDS)
            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build();
    
        try (Response response = client.newCall(request).execute()) {
    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)
  4. samples/guide/src/main/java/okhttp3/recipes/PostFile.java

        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);
    
          System.out.println(response.body().string());
        }
    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)
  5. regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java

        sendRequest(client, "https://google.com/robots.txt");
      }
    
      private void sendRequest(OkHttpClient client, String url) throws IOException {
        Request request = new Request.Builder()
                .url(url)
                .build();
        try (Response response = client.newCall(request).execute()) {
          assertTrue(response.code() == 200 || response.code() == 404);
          assertEquals(Protocol.HTTP_2, response.protocol());
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jul 26 06:37:08 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

            }
            return Integer.toString(n);
          }
        };
    
        Request request = new Request.Builder()
            .url("https://api.github.com/markdown/raw")
            .post(requestBody)
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
    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)
  7. samples/guide/src/main/java/okhttp3/recipes/CertificatePinning.java

                  .add("publicobject.com", "sha256/Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=")
                  .build())
          .build();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/robots.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 08 21:30:01 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  8. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

            .socketFactory(new UnixDomainSocketFactory(socketFile))
            .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
            .build();
    
        Request request = new Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          System.out.println(response.body().string());
        }
    
        server.shutdown();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Dec 24 03:46:30 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java

            //.addPlatformTrustedCertificates()
            .build();
    
        client = new OkHttpClient.Builder()
                .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager())
                .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 9.3K bytes
    - Viewed (2)
  10. samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java

      private final OkHttpClient client = new OkHttpClient.Builder()
          .addInterceptor(new LoggingInterceptor())
          .build();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .build();
    
        Response response = client.newCall(request).execute();
        response.body().close();
      }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jan 01 15:55:32 GMT 2016
    - 2K bytes
    - Viewed (0)
Back to top