teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

タイプミス

2019/07/25 13:59

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -26,7 +26,7 @@
26
26
  catch(Exception ex)
27
27
  {
28
28
 
29
- WriteLine(ex.Message);//出力 No usable version of the libssl was found
29
+ WriteLine(ex.Message);//出力 The type initializer for 'System.Net.Http.CurlHandler' threw an exception.
30
30
  }
31
31
 
32
32
  ReadLine();

1

誤字

2019/07/25 13:59

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -11,22 +11,25 @@
11
11
  ### 該当のソースコード
12
12
 
13
13
  ```C#
14
- static async Task<string> GetAsync(string ip)
14
+ static async Task Main(string[] args)
15
15
  {
16
+
16
17
  try
17
18
  {
18
- using (var Get = new HttpClient())
19
+ using(var Get = new HttpClient())
19
20
  {
20
-
21
- var response = await Get.GetAsync(URL);//Getする
21
+ var response = await Get.GetAsync("https://www.youtube.com/");
22
- WriteLine("GET");
23
- return await response.Content.ReadAsStringAsync()??"null";//取り出す
22
+ WriteLine(await response.Content.ReadAsStringAsync());
24
23
  }
24
+
25
25
  }
26
- catch (Exception ex)
26
+ catch(Exception ex)
27
27
  {
28
+
28
- return ex.Message;//出力 The type initializer for 'System.Net.Http.CurlHandler' threw an exception.
29
+ WriteLine(ex.Message);//出力 No usable version of the libssl was found
29
30
  }
31
+
32
+ ReadLine();
30
33
  }
31
34
  ```
32
35