diff --git a/core-java-modules/core-java-networking-2/README.md b/core-java-modules/core-java-networking-2/README.md index 6b6151248e..ce54ce5e56 100644 --- a/core-java-modules/core-java-networking-2/README.md +++ b/core-java-modules/core-java-networking-2/README.md @@ -1,3 +1,5 @@ ### Relevant Articles - [Checking if a URL Exists in Java](https://www.baeldung.com/java-check-url-exists) +- [Do a Simple HTTP Request in Java](http://www.baeldung.com/java-http-request) +- [Sending Emails with Java](http://www.baeldung.com/java-email) diff --git a/core-java-modules/core-java-networking-2/pom.xml b/core-java-modules/core-java-networking-2/pom.xml index 8a26f6ab9f..1e46a9ef7f 100644 --- a/core-java-modules/core-java-networking-2/pom.xml +++ b/core-java-modules/core-java-networking-2/pom.xml @@ -12,9 +12,23 @@ + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + javax.mail + mail + ${javax.mail.version} + core-java-networking-2 - + + + + 1.5.0-b01 + diff --git a/core-java-modules/core-java-networking/src/main/java/com/baeldung/httprequest/FullResponseBuilder.java b/core-java-modules/core-java-networking-2/src/main/java/com/baeldung/httprequest/FullResponseBuilder.java similarity index 100% rename from core-java-modules/core-java-networking/src/main/java/com/baeldung/httprequest/FullResponseBuilder.java rename to core-java-modules/core-java-networking-2/src/main/java/com/baeldung/httprequest/FullResponseBuilder.java diff --git a/core-java-modules/core-java-networking/src/main/java/com/baeldung/httprequest/ParameterStringBuilder.java b/core-java-modules/core-java-networking-2/src/main/java/com/baeldung/httprequest/ParameterStringBuilder.java similarity index 100% rename from core-java-modules/core-java-networking/src/main/java/com/baeldung/httprequest/ParameterStringBuilder.java rename to core-java-modules/core-java-networking-2/src/main/java/com/baeldung/httprequest/ParameterStringBuilder.java diff --git a/core-java-modules/core-java-networking/src/main/java/com/baeldung/mail/EmailService.java b/core-java-modules/core-java-networking-2/src/main/java/com/baeldung/mail/EmailService.java similarity index 97% rename from core-java-modules/core-java-networking/src/main/java/com/baeldung/mail/EmailService.java rename to core-java-modules/core-java-networking-2/src/main/java/com/baeldung/mail/EmailService.java index e775b9f708..bd2024fdfa 100644 --- a/core-java-modules/core-java-networking/src/main/java/com/baeldung/mail/EmailService.java +++ b/core-java-modules/core-java-networking-2/src/main/java/com/baeldung/mail/EmailService.java @@ -1,15 +1,12 @@ package com.baeldung.mail; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.util.Properties; import javax.mail.*; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMultipart; +import java.io.File; +import java.util.Properties; public class EmailService { diff --git a/core-java-modules/core-java-networking/src/test/java/com/baeldung/httprequest/HttpRequestLiveTest.java b/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/httprequest/HttpRequestLiveTest.java similarity index 96% rename from core-java-modules/core-java-networking/src/test/java/com/baeldung/httprequest/HttpRequestLiveTest.java rename to core-java-modules/core-java-networking-2/src/test/java/com/baeldung/httprequest/HttpRequestLiveTest.java index 77bf9bc8db..41e0f2d6af 100644 --- a/core-java-modules/core-java-networking/src/test/java/com/baeldung/httprequest/HttpRequestLiveTest.java +++ b/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/httprequest/HttpRequestLiveTest.java @@ -3,14 +3,7 @@ package com.baeldung.httprequest; import org.apache.commons.lang3.StringUtils; import org.junit.Test; -import com.baeldung.httprequest.FullResponseBuilder; -import com.baeldung.httprequest.ParameterStringBuilder; - -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; +import java.io.*; import java.net.CookieManager; import java.net.HttpCookie; import java.net.HttpURLConnection; diff --git a/core-java-modules/core-java-networking/README.md b/core-java-modules/core-java-networking/README.md index 2341520df7..33fc3684a3 100644 --- a/core-java-modules/core-java-networking/README.md +++ b/core-java-modules/core-java-networking/README.md @@ -7,12 +7,10 @@ - [Connecting Through Proxy Servers in Core Java](https://www.baeldung.com/java-connect-via-proxy-server) - [Broadcasting and Multicasting in Java](http://www.baeldung.com/java-broadcast-multicast) - [A Guide To UDP In Java](http://www.baeldung.com/udp-in-java) -- [Sending Emails with Java](http://www.baeldung.com/java-email) - [A Guide To HTTP Cookies In Java](http://www.baeldung.com/cookies-java) - [A Guide to the Java URL](http://www.baeldung.com/java-url) - [Working with Network Interfaces in Java](http://www.baeldung.com/java-network-interfaces) - [A Guide to Java Sockets](http://www.baeldung.com/a-guide-to-java-sockets) - [Guide to Java URL Encoding/Decoding](http://www.baeldung.com/java-url-encoding-decoding) -- [Do a Simple HTTP Request in Java](http://www.baeldung.com/java-http-request) - [Difference between URL and URI](http://www.baeldung.com/java-url-vs-uri) - [Read an InputStream using the Java Server Socket](https://www.baeldung.com/java-inputstream-server-socket) diff --git a/core-java-modules/core-java-networking/pom.xml b/core-java-modules/core-java-networking/pom.xml index e2ee7b2fcc..b5071bf7df 100644 --- a/core-java-modules/core-java-networking/pom.xml +++ b/core-java-modules/core-java-networking/pom.xml @@ -14,11 +14,6 @@ - - javax.mail - mail - ${javax.mail.version} - commons-io commons-io @@ -29,11 +24,6 @@ spring-web ${springframework.spring-web.version} - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - @@ -41,7 +31,6 @@ - 1.5.0-b01 4.3.4.RELEASE