- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for trimMargin (0.04 sec)
-
okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt
|data: YHOO |data: +2 |data: 10 | | """.trimMargin(), ) assertThat(callbacks.remove()).isEqualTo(Event(null, null, "YHOO\n+2\n10")) } @Test fun multilineCr() { consumeEvents( """ |data: YHOO |data: +2 |data: 10 | | """.trimMargin().replace("\n", "\r"), )
Registered: 2025-05-30 11:42 - Last Modified: 2024-01-08 01:13 - 6.4K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt
|yyaoEufLKVXhrTQhRfodTeigi4RX |-----END CERTIFICATE----- | """.trimMargin() val pkcs8Pem = """ |-----BEGIN PRIVATE KEY----- |MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCA7ODT0xhGSNn4ESj6J |lu/GJQZoU9lDrCPeUcQ28tzOWw== |-----END PRIVATE KEY----- | """.trimMargin() val bcPkcs8Pem = """ |-----BEGIN PRIVATE KEY-----
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 22.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/MultipartReaderTest.kt
|abcd |efgh |--simple boundary |Content-Type: text/plain; charset=utf-8 |Content-ID: ijk | |ijkl |mnop | |--simple boundary-- """.trimMargin() .replace("\n", "\r\n") val parts = MultipartReader( boundary = "simple boundary", source = Buffer().writeUtf8(multipart), )
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-28 02:11 - 15.4K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
} @Test fun event() { server.enqueue( MockResponse .Builder() .body( """ |data: hey | | """.trimMargin(), ).setHeader("content-type", "text/event-stream") .build(), ) val source = newEventSource() assertThat(source.request().url.encodedPath).isEqualTo("/") listener.assertOpen()
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-27 14:58 - 6.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/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")
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 10.5K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerCertificatesTest.kt
|jaA9VEhgdaVhxBsT2qzUNDsXlOzGsliznDfoqETb | """.trimMargin() val certificateByteString = certificateBase64.decodeBase64()!! val certificatePem = """ |-----BEGIN CERTIFICATE----- |$certificateBase64 |-----END CERTIFICATE----- | """.trimMargin() val javaCertificate = certificatePem.decodeCertificatePem() val okHttpCertificate =
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 43.9K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 2.8K bytes - Viewed (0) -
okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/GenerateIdnaMappingTableCode.kt
|⇤) """.trimMargin(), idnaMappingTable, data.sections.escapeDataString(), data.ranges.escapeDataString(), data.mappings.escapeDataString(), ).build(), ).build() } /** * KotlinPoet doesn't really know what to do with a string containing NUL, BEL, DEL, etc. We also * don't want to perform `trimMargin()` at runtime. */
Registered: 2025-05-30 11:42 - Last Modified: 2025-03-19 19:25 - 2.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/UnreadableResponseBody.kt
| * Response.networkResponse | * Response.priorResponse | * EventSourceListener | * WebSocketListener |(It is safe to call contentType() and contentLength() on these response bodies.) """.trimMargin(), ) override fun timeout() = Timeout.NONE override fun close() { } } fun Response.stripBody(): Response = newBuilder()
Registered: 2025-05-30 11:42 - Last Modified: 2025-05-27 15:19 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostString.kt
fun run() { val postBody = """ |Releases |-------- | | * _1.0_ May 6, 2013 | * _1.1_ June 15, 2013 | * _1.2_ August 11, 2013 | """.trimMargin() val request = Request( url = "https://api.github.com/markdown/raw".toHttpUrl(), body = postBody.toRequestBody(MEDIA_TYPE_MARKDOWN), )
Registered: 2025-05-30 11:42 - Last Modified: 2024-01-08 01:13 - 1.6K bytes - Viewed (0)