how to recreate a working CURL command with Invoke-WebRequest in Powershell

后端 未结 3 510
生来不讨喜
生来不讨喜 2020-12-28 20:27

This curl command works as desired:

curl -H \"X-Api-Key:j65k423lj4k2l3fds\" `
     -X PUT `
     -d \"alerts_enabled=true\" `
        https://some/working/fi         


        
3条回答
  •  不思量自难忘°
    2020-12-28 21:14

    This works for me in Powershell using the curl alias to Invoke-WebRequest...

     curl -H @{"X-Api-Key" = "j65k423lj4k2l3fds"} -Method PUT 'https://some/working/file.xml'
    

提交回复
热议问题