Siddharth Gorey
Siddharth Gorey

Reputation: 43

What is the Maven dependency for org.apache.camel.component.http.HttpMethods for a Spring Boot app?

What dependency should I add for org.apache.camel.component.http.HttpMethods to be added to my Spring boot project? I have tried these but none of these seem to be working...

https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
https://mvnrepository.com/artifact/org.apache.camel/camel-http 
https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient 

Also, I could not find the dependency on Google search.

Upvotes: 0

Views: 2198

Answers (2)

Olivier Boissé
Olivier Boissé

Reputation: 18143

I think you should add these dependencies to your project :

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-spring-boot-starter</artifactId>
  <version>${camel.version}</version> <!-- the camel version -->
</dependency>

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-http-starter</artifactId>
  <version>${camel.version}</version> <!-- the camel version -->
</dependency>

Upvotes: 0

Karol Dowbecki
Karol Dowbecki

Reputation: 44960

org.apache.camel.component.http.HttpMethods can be found in org.apache.camel:camel-http artifact.

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-http</artifactId>
  <version>2.22.1</version>
</dependency>

I'm not sure why you are saying it's not there:

$ zipinfo -1 camel-http-2.22.1.jar | grep HttpMethods
org/apache/camel/component/http/HttpMethods.class

Upvotes: 1

Related Questions