BlackJack 6 years ago
parent
commit
a442f7e9de
2 changed files with 14 additions and 0 deletions
  1. 1
    0
      .idea/ZCW-Fido-URLFetch.iml
  2. 13
    0
      src/main/java/Main.java

+ 1
- 0
.idea/ZCW-Fido-URLFetch.iml View File

@@ -7,6 +7,7 @@
7 7
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8 8
       <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9 9
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10
+      <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
10 11
       <excludeFolder url="file://$MODULE_DIR$/target" />
11 12
     </content>
12 13
     <orderEntry type="inheritedJdk" />

+ 13
- 0
src/main/java/Main.java View File

@@ -1,6 +1,19 @@
1
+import java.util.*;
1 2
 public class Main {
2 3
     public static void main(String[] args) {
3 4
         //ask for a url
5
+        System.out.println("Enter a url: ");
6
+
7
+        Scanner scanner = new Scanner(System.in);
8
+        String url = scanner.nextLine().trim();
9
+        System.out.println("Fetching" + url);
10
+
11
+        String connect = null;
12
+        URLConnection connection = null;
13
+
14
+        try{
15
+            connection = new 
16
+        }
4 17
         // fetch the url
5 18
         // print the url
6 19
     }