Merge pull request #7138 from amit2103/BAEL-15412
[BAEL-15412] - Moved article to libraries-http module
This commit is contained in:
commit
636a25c2aa
7
libraries-http/README.md
Normal file
7
libraries-http/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
|
- [A Guide to OkHttp](http://www.baeldung.com/guide-to-okhttp)
|
||||||
|
- [A Guide to Google-Http-Client](http://www.baeldung.com/google-http-client)
|
||||||
|
- [Asynchronous HTTP with async-http-client in Java](http://www.baeldung.com/async-http-client)
|
||||||
|
- [WebSockets with AsyncHttpClient](http://www.baeldung.com/async-http-client-websockets)
|
81
libraries-http/pom.xml
Normal file
81
libraries-http/pom.xml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>libraries-http</artifactId>
|
||||||
|
<name>libraries-http</name>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung</groupId>
|
||||||
|
<artifactId>parent-modules</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.assertj</groupId>
|
||||||
|
<artifactId>assertj-core</artifactId>
|
||||||
|
<version>${assertj.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Dependencies for response decoder with okhttp -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>${com.squareup.okhttp3.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Dependencies for google http client -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.http-client</groupId>
|
||||||
|
<artifactId>google-http-client</artifactId>
|
||||||
|
<version>${googleclient.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.http-client</groupId>
|
||||||
|
<artifactId>google-http-client-jackson2</artifactId>
|
||||||
|
<version>${googleclient.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.http-client</groupId>
|
||||||
|
<artifactId>google-http-client-gson</artifactId>
|
||||||
|
<version>${googleclient.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.asynchttpclient/async-http-client -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.asynchttpclient</groupId>
|
||||||
|
<artifactId>async-http-client</artifactId>
|
||||||
|
<version>${async.http.client.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
<version>2.8.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>mockwebserver</artifactId>
|
||||||
|
<version>${com.squareup.okhttp3.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<assertj.version>3.6.2</assertj.version>
|
||||||
|
<com.squareup.okhttp3.version>3.14.2</com.squareup.okhttp3.version>
|
||||||
|
<googleclient.version>1.23.0</googleclient.version>
|
||||||
|
<async.http.client.version>2.2.0</async.http.client.version>
|
||||||
|
</properties>
|
||||||
|
</project>
|
13
libraries-http/src/main/resources/logback.xml
Normal file
13
libraries-http/src/main/resources/logback.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||||
|
</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="STDOUT" />
|
||||||
|
</root>
|
||||||
|
</configuration>
|
@ -19,6 +19,9 @@ import okhttp3.Response;
|
|||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute <code>spring-rest</code> module before running this live test
|
||||||
|
*/
|
||||||
public class OkHttpFileUploadingLiveTest {
|
public class OkHttpFileUploadingLiveTest {
|
||||||
|
|
||||||
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
@ -17,6 +17,9 @@ import okhttp3.Response;
|
|||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute <code>spring-rest</code> module before running this live test
|
||||||
|
*/
|
||||||
public class OkHttpGetLiveTest {
|
public class OkHttpGetLiveTest {
|
||||||
|
|
||||||
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
@ -20,6 +20,9 @@ import org.junit.Test;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute <code>spring-rest</code> module before running this live test
|
||||||
|
*/
|
||||||
public class OkHttpMiscLiveTest {
|
public class OkHttpMiscLiveTest {
|
||||||
|
|
||||||
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
@ -20,6 +20,9 @@ import okhttp3.Response;
|
|||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute <code>spring-rest</code> module before running this live test
|
||||||
|
*/
|
||||||
public class OkHttpPostingLiveTest {
|
public class OkHttpPostingLiveTest {
|
||||||
|
|
||||||
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
private static final String BASE_URL = "http://localhost:" + APPLICATION_PORT + "/spring-rest";
|
@ -36,14 +36,11 @@
|
|||||||
- [Introduction To Docx4J](http://www.baeldung.com/docx4j)
|
- [Introduction To Docx4J](http://www.baeldung.com/docx4j)
|
||||||
- [Introduction to StreamEx](http://www.baeldung.com/streamex)
|
- [Introduction to StreamEx](http://www.baeldung.com/streamex)
|
||||||
- [Introduction to BouncyCastle with Java](http://www.baeldung.com/java-bouncy-castle)
|
- [Introduction to BouncyCastle with Java](http://www.baeldung.com/java-bouncy-castle)
|
||||||
- [A Guide to Google-Http-Client](http://www.baeldung.com/google-http-client)
|
|
||||||
- [Interact with Google Sheets from Java](http://www.baeldung.com/google-sheets-java-client)
|
- [Interact with Google Sheets from Java](http://www.baeldung.com/google-sheets-java-client)
|
||||||
- [A Docker Guide for Java](http://www.baeldung.com/docker-java-api)
|
- [A Docker Guide for Java](http://www.baeldung.com/docker-java-api)
|
||||||
- [Introduction To OpenCSV](http://www.baeldung.com/opencsv)
|
- [Introduction To OpenCSV](http://www.baeldung.com/opencsv)
|
||||||
- [Introduction to Akka Actors in Java](http://www.baeldung.com/akka-actors-java)
|
- [Introduction to Akka Actors in Java](http://www.baeldung.com/akka-actors-java)
|
||||||
- [Asynchronous HTTP with async-http-client in Java](http://www.baeldung.com/async-http-client)
|
|
||||||
- [Introduction to Smooks](http://www.baeldung.com/smooks)
|
- [Introduction to Smooks](http://www.baeldung.com/smooks)
|
||||||
- [WebSockets with AsyncHttpClient](http://www.baeldung.com/async-http-client-websockets)
|
|
||||||
- [A Guide to Infinispan in Java](http://www.baeldung.com/infinispan)
|
- [A Guide to Infinispan in Java](http://www.baeldung.com/infinispan)
|
||||||
- [Introduction to OpenCSV](http://www.baeldung.com/opencsv)
|
- [Introduction to OpenCSV](http://www.baeldung.com/opencsv)
|
||||||
- [A Guide to Unirest](http://www.baeldung.com/unirest)
|
- [A Guide to Unirest](http://www.baeldung.com/unirest)
|
||||||
|
@ -28,13 +28,7 @@
|
|||||||
<version>${typesafe-akka.version}</version>
|
<version>${typesafe-akka.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.asynchttpclient/async-http-client -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.asynchttpclient</groupId>
|
|
||||||
<artifactId>async-http-client</artifactId>
|
|
||||||
<version>${async.http.client.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.beykery/neuroph/2.92 -->
|
<!-- https://mvnrepository.com/artifact/org.beykery/neuroph/2.92 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.beykery</groupId>
|
<groupId>org.beykery</groupId>
|
||||||
@ -875,7 +869,6 @@
|
|||||||
<kafka.version>2.0.0</kafka.version>
|
<kafka.version>2.0.0</kafka.version>
|
||||||
<smooks.version>1.7.0</smooks.version>
|
<smooks.version>1.7.0</smooks.version>
|
||||||
<docker.version>3.0.14</docker.version>
|
<docker.version>3.0.14</docker.version>
|
||||||
<async.http.client.version>2.2.0</async.http.client.version>
|
|
||||||
<infinispan.version>9.1.5.Final</infinispan.version>
|
<infinispan.version>9.1.5.Final</infinispan.version>
|
||||||
<opencsv.version>4.1</opencsv.version>
|
<opencsv.version>4.1</opencsv.version>
|
||||||
<unirest.version>1.4.9</unirest.version>
|
<unirest.version>1.4.9</unirest.version>
|
||||||
|
2
pom.xml
2
pom.xml
@ -506,6 +506,7 @@
|
|||||||
<module>libraries-primitive</module>
|
<module>libraries-primitive</module>
|
||||||
<module>libraries-security</module>
|
<module>libraries-security</module>
|
||||||
<module>libraries-server</module>
|
<module>libraries-server</module>
|
||||||
|
<module>libraries-http</module>
|
||||||
<module>linkrest</module>
|
<module>linkrest</module>
|
||||||
<module>logging-modules</module>
|
<module>logging-modules</module>
|
||||||
<module>lombok</module>
|
<module>lombok</module>
|
||||||
@ -1185,6 +1186,7 @@
|
|||||||
<module>libraries-apache-commons</module>
|
<module>libraries-apache-commons</module>
|
||||||
<module>libraries-security</module>
|
<module>libraries-security</module>
|
||||||
<module>libraries-server</module>
|
<module>libraries-server</module>
|
||||||
|
<module>libraries-http</module>
|
||||||
<module>linkrest</module>
|
<module>linkrest</module>
|
||||||
<module>logging-modules</module>
|
<module>logging-modules</module>
|
||||||
<module>lombok</module>
|
<module>lombok</module>
|
||||||
|
@ -6,7 +6,6 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
|
|||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Spring @RequestMapping](http://www.baeldung.com/spring-requestmapping)
|
- [Spring @RequestMapping](http://www.baeldung.com/spring-requestmapping)
|
||||||
- [Returning Custom Status Codes from Spring Controllers](http://www.baeldung.com/spring-mvc-controller-custom-http-status-code)
|
- [Returning Custom Status Codes from Spring Controllers](http://www.baeldung.com/spring-mvc-controller-custom-http-status-code)
|
||||||
- [A Guide to OkHttp](http://www.baeldung.com/guide-to-okhttp)
|
|
||||||
- [Binary Data Formats in a Spring REST API](http://www.baeldung.com/spring-rest-api-with-binary-data-formats)
|
- [Binary Data Formats in a Spring REST API](http://www.baeldung.com/spring-rest-api-with-binary-data-formats)
|
||||||
- [Guide to UriComponentsBuilder in Spring](http://www.baeldung.com/spring-uricomponentsbuilder)
|
- [Guide to UriComponentsBuilder in Spring](http://www.baeldung.com/spring-uricomponentsbuilder)
|
||||||
- [Introduction to FindBugs](http://www.baeldung.com/intro-to-findbugs)
|
- [Introduction to FindBugs](http://www.baeldung.com/intro-to-findbugs)
|
||||||
|
@ -93,13 +93,6 @@
|
|||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- okhttp -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>${com.squareup.okhttp3.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- test scoped -->
|
<!-- test scoped -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hamcrest</groupId>
|
<groupId>org.hamcrest</groupId>
|
||||||
@ -280,8 +273,6 @@
|
|||||||
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
|
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
|
||||||
<checkstyle-maven-plugin.version>3.0.0</checkstyle-maven-plugin.version>
|
<checkstyle-maven-plugin.version>3.0.0</checkstyle-maven-plugin.version>
|
||||||
<dependency.locations.enabled>false</dependency.locations.enabled>
|
<dependency.locations.enabled>false</dependency.locations.enabled>
|
||||||
<!-- okhttp -->
|
|
||||||
<com.squareup.okhttp3.version>3.4.1</com.squareup.okhttp3.version>
|
|
||||||
|
|
||||||
<json.path.version>2.2.0</json.path.version>
|
<json.path.version>2.2.0</json.path.version>
|
||||||
<pact.version>3.5.11</pact.version>
|
<pact.version>3.5.11</pact.version>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user