* ウェブページの取得 - Invoke-WebRequest (wget) [#n1636953]

** GET [#t9654781]
 $res = wget http://www.yahoo.co.jp/
 $res.Content | Out-File index.html
 echo $res.Links.href

** POST [#h89ad6d6]
 $params = @{ name = "taro"; age = 10 } 
 $res = wget -Method Post -Uri http://example.com/ -Body $params

** 注意点 [#zf42e678]
- バイナリファイルなど容量の大きなファイルをダウンロードする用途では、Invoke-WebRequestコマンドレットは重いので、curl.exeなど別のコマンドを使った方が良い。

** 参考 [#p596b95d]
http://technet.microsoft.com/library/3e3dac17-3373-4d22-a54a-9d56a4a556c3(v=wps.630).aspx

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS