0

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.

John Humphreys
  • 37,047
  • 37
  • 155
  • 255

2 Answers2

1

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
Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
0

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>
Olivier Boissé
  • 15,834
  • 6
  • 38
  • 56