From e60a848afd94da857414481aef1302d38a1c6b4c Mon Sep 17 00:00:00 2001 From: PycJIaH Date: Wed, 30 Jun 2021 16:21:23 +0300 Subject: [PATCH 1/3] Added request to jokes site --- .gitignore | 2 ++ .idea/.gitignore | 8 ++++++ .idea/DZ_Java_Core.iml | 22 +++++++++++++++ .idea/compiler.xml | 16 +++++++++++ .idea/jarRepositories.xml | 20 ++++++++++++++ ...ven__com_squareup_okhttp3_okhttp_4_9_1.xml | 13 +++++++++ .../Maven__com_squareup_okio_okio_2_8_0.xml | 13 +++++++++ .../Maven__org_jetbrains_annotations_13_0.xml | 13 +++++++++ ..._jetbrains_kotlin_kotlin_stdlib_1_4_10.xml | 13 +++++++++ ...ains_kotlin_kotlin_stdlib_common_1_4_0.xml | 13 +++++++++ .idea/misc.xml | 13 +++++++++ .idea/modules.xml | 8 ++++++ .idea/vcs.xml | 6 +++++ pom.xml | 27 +++++++++++++++++++ src/main/java/Main.java | 20 ++++++++++++++ 15 files changed, 207 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/DZ_Java_Core.iml create mode 100644 .idea/compiler.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml create mode 100644 .idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml create mode 100644 .idea/libraries/Maven__org_jetbrains_annotations_13_0.xml create mode 100644 .idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml create mode 100644 .idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 pom.xml create mode 100644 src/main/java/Main.java diff --git a/.gitignore b/.gitignore index a1c2a23..27d44ea 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* + +.idea \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/DZ_Java_Core.iml b/.idea/DZ_Java_Core.iml new file mode 100644 index 0000000..9424b4e --- /dev/null +++ b/.idea/DZ_Java_Core.iml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..9757384 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml b/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml new file mode 100644 index 0000000..fe07425 --- /dev/null +++ b/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml b/.idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml new file mode 100644 index 0000000..6603312 --- /dev/null +++ b/.idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_annotations_13_0.xml b/.idea/libraries/Maven__org_jetbrains_annotations_13_0.xml new file mode 100644 index 0000000..e2c8297 --- /dev/null +++ b/.idea/libraries/Maven__org_jetbrains_annotations_13_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml b/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml new file mode 100644 index 0000000..433f1d0 --- /dev/null +++ b/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml b/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml new file mode 100644 index 0000000..b46ccca --- /dev/null +++ b/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..3b67321 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e8bc934 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1b27694 --- /dev/null +++ b/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + groupId + DZ_Java_Core + 1.0-SNAPSHOT + + + 16 + 16 + + + + + + com.squareup.okhttp3 + okhttp + 4.9.1 + + + + + + \ No newline at end of file diff --git a/src/main/java/Main.java b/src/main/java/Main.java new file mode 100644 index 0000000..b0b6642 --- /dev/null +++ b/src/main/java/Main.java @@ -0,0 +1,20 @@ +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +import java.io.IOException; + +public class Main { + public static void main(String[] args) throws IOException { + OkHttpClient okHttpClient = new OkHttpClient(); + + Request request = new Request.Builder() + .url("https://icanhazdadjoke.com/") + .header("Accept", "application/json") + .build(); + + Response response = okHttpClient.newCall(request).execute(); + + System.out.println(response.body().string()); + } +} From aebd15a8b531dc9a800501a71057e10be1bfdb73 Mon Sep 17 00:00:00 2001 From: PycJIaH Date: Wed, 30 Jun 2021 16:22:18 +0300 Subject: [PATCH 2/3] Added request to jokes site --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 27d44ea..094745b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,4 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -.idea \ No newline at end of file +.idea From 2051922099206c3bf26c4ce7d8c1beea660cca0f Mon Sep 17 00:00:00 2001 From: Ruslan Valeev <86679954+PycJIaH@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:31:51 +0300 Subject: [PATCH 3/3] Delete .idea directory --- .idea/.gitignore | 8 ------- .idea/DZ_Java_Core.iml | 22 ------------------- .idea/compiler.xml | 16 -------------- .idea/jarRepositories.xml | 20 ----------------- ...ven__com_squareup_okhttp3_okhttp_4_9_1.xml | 13 ----------- .../Maven__com_squareup_okio_okio_2_8_0.xml | 13 ----------- .../Maven__org_jetbrains_annotations_13_0.xml | 13 ----------- ..._jetbrains_kotlin_kotlin_stdlib_1_4_10.xml | 13 ----------- ...ains_kotlin_kotlin_stdlib_common_1_4_0.xml | 13 ----------- .idea/misc.xml | 13 ----------- .idea/modules.xml | 8 ------- .idea/vcs.xml | 6 ----- 12 files changed, 158 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/DZ_Java_Core.iml delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/jarRepositories.xml delete mode 100644 .idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml delete mode 100644 .idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml delete mode 100644 .idea/libraries/Maven__org_jetbrains_annotations_13_0.xml delete mode 100644 .idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml delete mode 100644 .idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e0..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/DZ_Java_Core.iml b/.idea/DZ_Java_Core.iml deleted file mode 100644 index 9424b4e..0000000 --- a/.idea/DZ_Java_Core.iml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index 9757384..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index 712ab9d..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml b/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml deleted file mode 100644 index fe07425..0000000 --- a/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_4_9_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml b/.idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml deleted file mode 100644 index 6603312..0000000 --- a/.idea/libraries/Maven__com_squareup_okio_okio_2_8_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_annotations_13_0.xml b/.idea/libraries/Maven__org_jetbrains_annotations_13_0.xml deleted file mode 100644 index e2c8297..0000000 --- a/.idea/libraries/Maven__org_jetbrains_annotations_13_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml b/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml deleted file mode 100644 index 433f1d0..0000000 --- a/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_1_4_10.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml b/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml deleted file mode 100644 index b46ccca..0000000 --- a/.idea/libraries/Maven__org_jetbrains_kotlin_kotlin_stdlib_common_1_4_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 3b67321..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index e8bc934..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file