Class AhcHelper


  • public final class AhcHelper
    extends Object
    • Method Detail

      • writeObjectToStream

        public static void writeObjectToStream​(OutputStream stream,
                                               Object target)
                                        throws IOException
        Writes the given object as response body to the output stream
        Parameters:
        stream - output stream
        target - object to write
        Throws:
        IOException - is thrown if error writing
      • setCharsetFromContentType

        public static void setCharsetFromContentType​(String contentType,
                                                     org.apache.camel.Exchange exchange)
      • createURI

        public static URI createURI​(org.apache.camel.Exchange exchange,
                                    String url,
                                    AhcEndpoint endpoint)
                             throws URISyntaxException
        Creates the URI to invoke.
        Parameters:
        exchange - the exchange
        url - the url to invoke
        endpoint - the endpoint
        Returns:
        the URI to invoke
        Throws:
        URISyntaxException