add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

View File

@@ -0,0 +1,25 @@
# Invoke-WebRequest
> 执行对Web的HTTP/HTTPS请求。
> 注意此命令只能通过PowerShell使用。
> 更多信息:<https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-webrequest>。
- 将URL的内容下载到文件中
`Invoke-WebRequest {{http://example.com}} -OutFile {{path\to\file}}`
- 发送表单编码的数据(类型为`application/x-www-form-urlencoded`的POST请求
`Invoke-WebRequest -Method Post -Body @{ name='bob' } {{http://example.com/form}}`
- 使用自定义HTTP方法发送带有额外头部的请求
`Invoke-WebRequest -Headers {{@{ X-My-Header = '123' }}} -Method {{PUT}} {{http://example.com}}`
- 以JSON格式发送数据指定适当的内容类型头
`Invoke-WebRequest -Body {{'{"name":"bob"}'}} -ContentType 'application/json' {{http://example.com/users/1234}}`
- 传递用户名和密码进行服务器身份验证:
`Invoke-WebRequest -Headers @{ Authorization = "Basic "+ [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("myusername:mypassword")) } {{http://example.com}}`