- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for toCurl (0.14 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
fun curlGet() { val request = Request .Builder() .url("https://example.com") .header("Authorization", "Bearer abc123") .build() val curl = request.toCurl() assertThat(curl) .isEqualTo( """ |curl 'https://example.com/' \ | -H 'Authorization: Bearer abc123' """.trimMargin(), ) } @Test
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 24 11:36:14 UTC 2025 - 24.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt
* ``` * * **Note:** This will consume the request body. This may have side effects if the [RequestBody] * is streaming or can be consumed only once. */ @JvmOverloads fun toCurl(includeBody: Boolean = true): String = buildString { append("curl ${url.toString().shellEscape()}") val contentType = body?.contentType()?.toString() // Add method if not the default.
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Oct 30 13:46:58 UTC 2025 - 14.7K bytes - Viewed (1) -
CHANGELOG.md
* New: Publish events when calls must wait to execute. `EventListener.dispatcherQueueStart()` is invoked when a call starts waiting, and `dispatcherQueueEnd()` is invoked when it's done. * New: `Request.toCurl()` returns a copy-pasteable [curl] command consistent with Chrome’s and Firefox’s ‘copy as cURL’ features. * New: Support [JPMS]. We replaced our `Automatic-Module-Name` metadata with proper
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 05 16:02:59 UTC 2025 - 36.2K bytes - Viewed (2) -
android/guava-tests/test/com/google/common/reflect/ClassPathTest.java
new File("/usr/test/dep.jar").toURI(), ClassPath.getClassPathEntry(new File("/home/build/outer.jar"), "file:/usr/test/dep.jar") .toURI()); assertEquals( new File("/home/build/a.jar").toURI(), ClassPath.getClassPathEntry(new File("/home/build/outer.jar"), "a.jar").toURI()); assertEquals( new File("/home/build/x/y/z").toURI(),
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 21:00:51 UTC 2025 - 23K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/HttpUrlJvmTest.kt
.isEqualTo(URI("http://host/a%C2%9Fb")) // Percent-encoded in the query. assertThat("http://host/?a\u0000b".toHttpUrl().toUri()) .isEqualTo(URI("http://host/?a%00b")) assertThat("http://host/?a\u0080b".toHttpUrl().toUri()) .isEqualTo(URI("http://host/?a%C2%80b")) assertThat("http://host/?a\u009fb".toHttpUrl().toUri()) .isEqualTo(URI("http://host/?a%C2%9Fb")) // Stripped from the fragment.
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 12K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
| HttpUrl.get(URL) | URL.toHttpUrlOrNull() | | HttpUrl.parse(String) | String.toHttpUrlOrNull() | | HttpUrl.uri() | HttpUrl.toUri() | | HttpUrl.url() | HttpUrl.toUrl() | | MediaType.get(String) | String.toMediaType() | | MediaType.parse(String) | String.toMediaTypeOrNull() |
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
server.enqueue(MockResponse()) try { server .url("/a") .toUrl() .openConnection() .getInputStream() fail<Any>() } catch (expected: IOException) { } server .url("/b") .toUrl() .openConnection() .getInputStream() // Should succeed. } /**
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Jul 03 13:16:34 UTC 2025 - 22.3K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
server.enqueue(MockResponse()) try { server .url("/a") .toUrl() .openConnection() .getInputStream() fail<Unit>() } catch (expected: IOException) { // Expected. } server .url("/b") .toUrl() .openConnection() .getInputStream() // Should succeed. } @Test
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Aug 03 22:38:00 UTC 2025 - 28K bytes - Viewed (0) -
fess-crawler/src/test/java/org/codelibs/fess/crawler/client/ftp/FtpClientTest.java
assertEquals("ftp://123.123.123.123/ccc.txt", ftpInfo.toUrl("/aaa/../ccc.txt")); value = "ftp://123.123.123.123/test test.txt"; ftpInfo = new FtpClient.FtpInfo(value, Constants.UTF_8); assertEquals(value, ftpInfo.toUrl()); assertEquals("123.123.123.123:21", ftpInfo.getCacheKey()); assertEquals("123.123.123.123", ftpInfo.getHost());
Registered: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Mon Nov 24 03:59:47 UTC 2025 - 21.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkFactories.java
@Override public ByteSource createSource(byte[] bytes) throws IOException { super.createSource(bytes); return Resources.asByteSource(getFile().toURI().toURL()); } } private static class UrlCharSourceFactory extends FileCharSourceFactory { @SuppressWarnings("CheckReturnValue") // only using super.createSource to create a file @OverrideRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 17.9K bytes - Viewed (0)