- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for openConnection (0.09 sec)
-
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
} } @Test fun testUrlConnectionDirect() { testRequest { val url = URI(mockServer.endpoint + "/person?name=peter").toURL() val connection = url.openConnection() as HttpURLConnection assertThat(connection.inputStream.source().buffer().readUtf8()).contains("Peter the person") } } @Test fun testUrlConnectionPlaintextProxied() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 5.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. } /** * Throttle the request body by sleeping 500ms after every 3 bytes. With a 6-byte request, this
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K 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 fun clearDispatcherQueue() { server.enqueue(MockResponse(body = "A"))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ClassTraversalTest.java
final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class"; final URL classURL = ResourceUtil.getResource(classFilePath); final JarURLConnection con = (JarURLConnection) classURL.openConnection(); ClassTraversalUtil.forEach(con.getJarFile(), (ClassHandler) (packageName, shortClassName) -> { if (count < 10) { System.out.println(ClassUtil.concatName(packageName, shortClassName));
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 5.1K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt
return MockResponse() } } assertThat(requestsMade.size).isEqualTo(0) mockWebServer.dispatcher = dispatcher val url = mockWebServer.url("/").toUrl() val conn = url.openConnection() as HttpURLConnection conn.responseCode // Force the connection to hit the "server". // Make sure our dispatcher got the request. assertThat(requestsMade.size).isEqualTo(1) } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.3K bytes - Viewed (0) -
mockwebserver-junit4/src/test/java/mockwebserver3/junit4/MockWebServerRuleTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/ResourceTraversalTest.java
final String classFilePath = TestCase.class.getName().replace('.', '/') + ".class"; final URL classURL = ResourceUtil.getResource(classFilePath); final JarURLConnection con = (JarURLConnection) classURL.openConnection(); ResourceTraversalUtil.forEach(con.getJarFile(), (ResourceHandler) (path, is) -> { try { if (count < 10) { System.out.println(path); }
Registered: Fri Nov 01 20:58:10 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 6K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/net/protocol/storage/Handler.java
import io.minio.errors.ServerException; import io.minio.errors.XmlParserException; public class Handler extends URLStreamHandler { @Override protected URLConnection openConnection(final URL u) throws IOException { return new StorageURLConnection(u); } public class StorageURLConnection extends URLConnection { private MinioClient minioClient;
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 6.3K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/test/net/protocol/xxx4/Handler.java
import java.io.IOException; import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandler; public class Handler extends URLStreamHandler { @Override protected URLConnection openConnection(URL u) throws IOException { return null; }
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Tue Jun 18 00:44:11 UTC 2024 - 951 bytes - Viewed (0) -
src/test/java/org/codelibs/fess/test/net/protocol/xxx2/Handler.java
import java.net.URLConnection; import java.net.URLStreamHandler; public class Handler extends URLStreamHandler { public static final String PROTOCOL_TYPE = "file"; @Override protected URLConnection openConnection(URL u) throws IOException { return null; }
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Tue Jun 18 00:44:11 UTC 2024 - 1007 bytes - Viewed (0)