Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for CurlException (0.05 sec)

  1. src/main/java/org/codelibs/curl/CurlException.java

     *
     * <p>Usage examples:</p>
     * <pre>
     *     throw new CurlException("Error message");
     *     throw new CurlException("Error message", cause);
     * </pre>
     *
     * @see RuntimeException
     */
    public class CurlException extends RuntimeException {
    
        private static final long serialVersionUID = 1L;
    
        /**
         * Constructs a new CurlException with the specified detail message and cause.
         *
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:38:18 UTC 2025
    - 2K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/curl/CurlRequestTest.java

            request.param("key", "value");
    
            try {
                request.encoding("ISO-8859-1");
                fail("Expected CurlException");
            } catch (CurlException e) {
                assertTrue(e.getMessage().contains("must be called before param method"));
            }
        }
    
        @Test
        public void testThresholdMethod() {
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Thu Jul 31 01:01:12 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/curl/CurlRequest.java

         *
         * @param encoding the encoding
         * @return this CurlRequest instance
         * @throws CurlException if the method is called after the param method
         */
        public CurlRequest encoding(final String encoding) {
            if (paramList != null) {
                throw new CurlException("This method must be called before param method.");
            }
            this.encoding = encoding;
            return this;
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:38:18 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/curl/CurlExceptionTest.java

            CurlException exception = new CurlException(message);
            String toString = exception.toString();
    
            assertNotNull(toString);
            assertTrue(toString.contains("CurlException"));
            assertTrue(toString.contains(message));
        }
    
        @Test
        public void testStackTrace() {
            CurlException exception = new CurlException("Test message");
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Thu Jul 31 01:01:12 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/curl/CurlResponseTest.java

                fail("Expected CurlException");
            } catch (CurlException e) {
                assertTrue(e.getMessage().contains("Failed to access the content"));
                // The cause should be another CurlException from getContentAsStream()
                assertTrue(e.getCause() instanceof CurlException);
                CurlException innerException = (CurlException) e.getCause();
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Thu Jul 31 01:01:12 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/curl/CurlResponse.java

            } catch (final Exception e) {
                throw new CurlException("Failed to access the content.", e);
            }
        }
    
        /**
         * Gets the content of the response as an InputStream.
         *
         * @return the content as an InputStream.
         * @throws IOException if an I/O error occurs.
         * @throws CurlException if the content does not exist.
         */
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:38:18 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  7. README.md

    - `org.codelibs.curl.CurlRequest`: builder for HTTP requests.
    - `org.codelibs.curl.CurlResponse`: wrapper for HTTP responses.
    - `org.codelibs.curl.CurlException`: unchecked exception for errors.
    - `org.codelibs.curl.io.ContentCache` and `ContentOutputStream`: internal utilities for streaming and caching.
    
    Refer to the Javadoc for full API details.
    
    ## Building and Testing
    
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Sat Jul 05 01:11:14 UTC 2025
    - 2.5K bytes
    - Viewed (0)
Back to top