Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 152 for _new (0.15 sec)

  1. okhttp/src/main/kotlin/okhttp3/CipherSuite.kt

          if (result == null) {
            result = INSTANCES[secondaryName(javaName)]
    
            if (result == null) {
              result = CipherSuite(javaName)
            }
    
            // Add the new cipher suite, or a confirmed alias.
            INSTANCES[javaName] = result
          }
          return result
        }
    
        private fun secondaryName(javaName: String): String {
          return when {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 39.9K bytes
    - Viewed (1)
  2. docs/changelogs/changelog_3x.md

     *  Fix: Permit multipart file names to contain non-ASCII characters.
     *  New: API to get MockWebServer's dispatcher.
     *  New: API to access headers as `java.time.Instant`.
     *  New: Fail fast if a `SSLSocketFactory` is used as a `SocketFactory`.
     *  New: Log the TLS handshake in `LoggingEventListener`.
    
    ## Version 3.12.13
    
    _2021-01-30_
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

        final ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
            .cipherSuites(customCipherSuites.toArray(new CipherSuite[0]))
            .build();
    
        X509TrustManager trustManager = defaultTrustManager();
        SSLSocketFactory sslSocketFactory = defaultSslSocketFactory(trustManager);
        SSLSocketFactory customSslSocketFactory = new DelegatingSSLSocketFactory(sslSocketFactory) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Mar 14 21:57:42 GMT 2019
    - 6.5K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java

    public final class PrintEvents {
      private final OkHttpClient client = new OkHttpClient.Builder()
          .eventListenerFactory(PrintingEventListener.FACTORY)
          .build();
    
      public void run() throws Exception {
        Request washingtonPostRequest = new Request.Builder()
            .url("https://www.washingtonpost.com/")
            .build();
        client.newCall(washingtonPostRequest).enqueue(new Callback() {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java

      private static final MediaType MEDIA_TYPE_PNG = MediaType.get("image/png");
    
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
        RequestBody requestBody = new MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("title", "Square Logo")
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jun 24 12:59:42 GMT 2019
    - 2.2K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/SynchronousGet.java

    public final class SynchronousGet {
      private final OkHttpClient client = new OkHttpClient();
    
      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("https://publicobject.com/helloworld.txt")
            .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: Sun May 22 01:29:42 GMT 2016
    - 1.5K bytes
    - Viewed (0)
  7. samples/slack/src/main/java/okhttp3/slack/SlackClient.java

        }
    
        RtmSession rtmSession = new RtmSession(slackApi);
        rtmSession.open(accessToken);
      }
    
      public static void main(String... args) throws Exception {
        String clientId = "0000000000.00000000000";
        String clientSecret = "00000000000000000000000000000000";
        int port = 53203;
        SlackApi slackApi = new SlackApi(clientId, clientSecret, port);
    
        SlackClient client = new SlackClient(slackApi);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java

      private static final Logger logger = Logger.getLogger(LoggingInterceptors.class.getName());
      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();
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jan 01 15:55:32 GMT 2016
    - 2K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_1x.md

    has been replaced with a new synthetic header, `OkHttp-Selected-Protocol`.
    
    ##### Changes
    
     * New: Support for `HTTP-draft-09/2.0`.
     * New: Support for `spdy/3.1`. Dropped support for `spdy/3`.
     * New: Use ALPN on Android platforms that support it (4.4+)
     * New: CacheControl model and parser.
     * New: Protocol selection in MockWebServer.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 6.4K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/guide/PostExample.java

    public class PostExample {
      public static final MediaType JSON = MediaType.get("application/json; charset=utf-8");
    
      final OkHttpClient client = new OkHttpClient();
    
      String post(String url, String json) throws IOException {
        RequestBody body = RequestBody.create(json, JSON);
        Request request = new Request.Builder()
            .url(url)
            .post(body)
            .build();
        try (Response response = client.newCall(request).execute()) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2K bytes
    - Viewed (0)
Back to top