Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for World (0.17 sec)

  1. mockwebserver/README.md

      // Responses are returned in the same order that they are enqueued.
      Chat chat = new Chat(baseUrl);
    
      chat.loadMore();
      assertEquals("hello, world!", chat.messages());
    
      chat.loadMore();
      chat.loadMore();
      assertEquals(""
          + "hello, world!\n"
          + "sup, bra?\n"
          + "yo dog", chat.messages());
    
      // Optional: confirm that your app made the HTTP requests you were expecting.
    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)
  2. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

            ranges = data.ranges,
            mappings = data.mappings,
          )
      }
    
      @Test fun regularMappings() {
        assertThat("hello".map()).isEqualTo("hello")
        assertThat("hello-world".map()).isEqualTo("hello-world")
        assertThat("HELLO".map()).isEqualTo("hello")
        assertThat("Hello".map()).isEqualTo("hello")
    
        // These compound characters map their its components.
        assertThat("¼".map()).isEqualTo("1⁄4")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  3. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        assertThat(headersToList(builder)).containsExactly("Cookie: a=android")
      }
    
      @Test
      fun regularResponse() {
        server.enqueue(MockResponse.Builder().body("hello world").build())
        val url = server.url("/").toUrl()
        val connection = url.openConnection() as HttpURLConnection
        connection.setRequestProperty("Accept-Language", "en-US")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        }
      }
    
      @Test
      fun singlePart() {
        val expected =
          """
          |--123
          |
          |Hello, World!
          |--123--
          |
          """.trimMargin().replace("\n", "\r\n")
        val body =
          MultipartBody.Builder("123")
            .addPart("Hello, World!".toRequestBody(null))
            .build()
        assertThat(body.boundary).isEqualTo("123")
        assertThat(body.type).isEqualTo(MultipartBody.MIXED)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  5. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(headersToList(response)).containsExactly("Cookie: a=android")
      }
    
      @Test
      fun regularResponse() {
        server.enqueue(MockResponse().setBody("hello world"))
        val url = server.url("/").toUrl()
        val connection = url.openConnection() as HttpURLConnection
        connection.setRequestProperty("Accept-Language", "en-US")
        val inputStream = connection.inputStream
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java

      }
    
      @Override public void onOpen(WebSocket webSocket, Response response) {
        webSocket.send("Hello...");
        webSocket.send("...World!");
        webSocket.send(ByteString.decodeHex("deadbeef"));
        webSocket.close(1000, "Goodbye, World!");
      }
    
      @Override public void onMessage(WebSocket webSocket, String text) {
        System.out.println("MESSAGE: " + text);
      }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 04 11:40:21 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt

      }
    
      @Test
      fun write() {
        val operator =
          FileOperator(
            randomAccessFile!!.getChannel(),
          )
        val buffer1 = Buffer().writeUtf8("Hello, World")
        operator.write(0, buffer1, 5)
        assertThat(buffer1.readUtf8()).isEqualTo(", World")
        val buffer2 = Buffer().writeUtf8("icopter!")
        operator.write(3, buffer2, 7)
        assertThat(buffer2.readUtf8()).isEqualTo("!")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. okhttp-tls/README.md

    a fake `HostnameVerifier` or `X509TrustManager`.
    
    Certificate Authorities
    -----------------------
    
    The above example uses a self-signed certificate. This is convenient for testing but not
    representative of real-world HTTPS deployment. To get closer to that we can use `HeldCertificate`
    to generate a trusted root certificate, an intermediate certificate, and a server certificate.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 9.1K bytes
    - Viewed (1)
  9. docs/features/caching.md

    Caching
    =======
    
    OkHttp implements an optional, off by default, Cache. OkHttp aims for RFC correct and
    pragmatic caching behaviour, following common real-world browser like Firefox/Chrome and 
    server behaviour when ambiguous.
    
    # Basic Usage
    
    ```kotlin
      private val client: OkHttpClient = OkHttpClient.Builder()
          .cache(Cache(
              directory = File(application.cacheDir, "http_cache"),
              // $0.05 worth of phone storage in 2020
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/HttpUrlTest.kt

        //
        // HttpUrl is quite lenient with what characters it accepts. In particular, characters like '{'
        // and '"' are permitted but unlikely to occur in real-world URLs. Unfortunately we can't just
        // lock it down due to URL templating: "http://{env}.{dc}.example.com".
        UrlComponentEncodingTester.newInstance()
          .nonPrintableAscii(Encoding.FORBIDDEN)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 67.9K bytes
    - Viewed (0)
Back to top