Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 62 for toCurl (0.11 sec)

  1. 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)
  2. guava-tests/test/com/google/common/io/ResourcesTest.java

        assertThrows(IllegalArgumentException.class, () -> Resources.getResource(tempFile.getName()));
    
        // Now set the context loader to one that should find the resource.
        URL baseUrl = tempFile.getParentFile().toURI().toURL();
        URLClassLoader loader = new URLClassLoader(new URL[] {baseUrl});
        ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader();
        try {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  3. 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)
  4. 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
        @Override
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  5. mockwebserver-junit4/src/test/java/mockwebserver3/junit4/MockWebServerRuleTest.kt

                rule.server
                  .url("/")
                  .toUrl()
                  .openConnection()
                  .connect()
              }
            },
            Description.EMPTY,
          )
        statement.evaluate()
        assertThat(called.get()).isTrue()
        try {
          rule.server
            .url("/")
            .toUrl()
            .openConnection()
            .connect()
          fail()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  6. 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
    - 25.7K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/io/FileUtil.java

         *
         * @param file the file (must not be {@literal null})
         * @return a URL object representing the file URL
         */
        public static URL toURL(final File file) {
            assertArgumentNotNull("file", file);
    
            try {
                return file.toURI().toURL();
            } catch (final IOException e) {
                throw new IORuntimeException(e);
            }
        }
    
        /**
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Sat Nov 22 11:21:59 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

                challenge.scheme,
                url.toUrl(),
                Authenticator.RequestorType.PROXY,
              )
            } else {
              Authenticator.requestPasswordAuthentication(
                url.host,
                proxy.connectToInetAddress(url, dns),
                url.port,
                url.scheme,
                challenge.realm,
                challenge.scheme,
                url.toUrl(),
                Authenticator.RequestorType.SERVER,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  9. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

              requestsMade.add(request)
              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)
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.2K bytes
    - Viewed (1)
  10. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

          assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1)
        }
      }
    
      @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(),
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.2K bytes
    - Viewed (1)
Back to top