JiriOndrusek commented on a change in pull request #2548: URL: https://github.com/apache/camel-quarkus/pull/2548#discussion_r625599957
########## File path: integration-tests/file/src/main/java/org/apache/camel/quarkus/component/file/it/FileResource.java ########## @@ -26,36 +29,102 @@ import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.Exchange; import org.apache.camel.ProducerTemplate; +import org.apache.camel.component.mock.MockEndpoint; @Path("/file") @ApplicationScoped public class FileResource { + public static String CONSUME_BATCH = "consumeBatch"; + public static String SORT_BY = "sortBy"; + public static String SEPARATOR = ";"; + @Inject ProducerTemplate producerTemplate; @Inject ConsumerTemplate consumerTemplate; + @Inject + CamelContext context; + @Path("/get/{folder}/{name}") - @GET + @POST @Produces(MediaType.TEXT_PLAIN) - public String getFile(@PathParam("folder") String folder, @PathParam("name") String name) throws Exception { - return consumerTemplate.receiveBodyNoWait("file:target/" + folder + "?fileName=" + name, String.class); + public String getFile(@PathParam("folder") String folder, @PathParam("name") String name, + @QueryParam("charset") String charset) throws Exception { + StringBuilder url = new StringBuilder(String.format("file:target/%s?fileName=%s", folder, name)); + if (charset != null && !charset.equals("")) { + url.append("&charset=").append(charset); + } + String s = consumerTemplate.receiveBodyNoWait(url.toString(), String.class); + System.out.println(s); Review comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org