質問編集履歴
3
ミス修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -13,7 +13,8 @@
|
|
13
13
|
$httpClient = New-Object System.Net.Http.HttpClient($handler)
|
14
14
|
|
15
15
|
# リクエストヘッダ取得
|
16
|
+
$URL = 'http://www.vim.org/scripts/download_script.php?src_id=19574'
|
16
|
-
$response = $httpClient.GetAsync($
|
17
|
+
$response = $httpClient.GetAsync($URL, 1)
|
17
18
|
$uri = $response.Result.RequestMessage.RequestUri #これがほしい
|
18
19
|
```
|
19
20
|
|
2
ミス修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
### 目的
|
2
2
|
リダイレクトしてリクエストヘッダのURLを取得するコードをcurlで作りたいです。
|
3
3
|
|
4
|
-
httpclientでは以下のようなコードです。
|
4
|
+
powershellのhttpclientでは以下のようなコードです。
|
5
5
|
```powershell
|
6
6
|
#TLSのバージョンを設定
|
7
7
|
[System.Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls13 -bor [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls11
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -13,8 +13,8 @@
|
|
13
13
|
$httpClient = New-Object System.Net.Http.HttpClient($handler)
|
14
14
|
|
15
15
|
# リクエストヘッダ取得
|
16
|
-
$response =
|
16
|
+
$response = $httpClient.GetAsync($Uri, 1)
|
17
|
-
$uri = $response.Result.RequestMessage.RequestUri #
|
17
|
+
$uri = $response.Result.RequestMessage.RequestUri #これがほしい
|
18
18
|
```
|
19
19
|
|
20
20
|
### curlのオプションについていくつか試しました
|