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

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

1
+import java.util.*;
1
 public class Main {
2
 public class Main {
2
     public static void main(String[] args) {
3
     public static void main(String[] args) {
3
         //ask for a url
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
         // fetch the url
17
         // fetch the url
5
         // print the url
18
         // print the url
6
     }
19
     }