Powershell 为什么我会收到这封信;调用RestMethod:notfound";错误?

Powershell 为什么我会收到这封信;调用RestMethod:notfound";错误?,powershell,powershell-core,Powershell,Powershell Core,我正在尝试调用使用invoke\u rest方法调用的powershell脚本。powershell脚本的工作原理与同事的计算机上的相同,但与我的计算机上的工作原理完全相同。我收到以下错误 15:47:48.270 Invoke-RestMethod : Not Found 15:47:48.271 At C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\ToscaCI\Client\deliver.ps1:15 char:1 15:47:48.2

我正在尝试调用使用invoke\u rest方法调用的powershell脚本。powershell脚本的工作原理与同事的计算机上的相同,但与我的计算机上的工作原理完全相同。我收到以下错误

15:47:48.270 Invoke-RestMethod : Not Found
15:47:48.271 At C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\ToscaCI\Client\deliver.ps1:15 char:1
15:47:48.272 + Invoke-RestMethod -Body $body -Method 'Post' -Uri $url
这是我调用的名为delver.ps1的powershell脚本

$url='1!'https://pulse-us-east-1.qtestnet.com/webhook/b9303bb6-d0e1-43ce-bf96be4a3b330c8f'
设置位置-路径“C:\Tosca\U项目\ Tosca\U工作区\第一步\测试结果”
$payload=(获取内容“result.xml”-原始)
$body=@{
“projectId”=“95814”
“试验循环”=“3539385”
“requiresDecode”=“true”
“结果”=$payload
}
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12
调用RestMethod-Body$Body-Method'Post'-Uri$url

我运行的是Windows 10 Powershell版本5.1.17763.503,我甚至升级到了Powershell 6.2.3,我收到了相同的错误

您是否使用
https://postman-echo.com/post
只是为了验证它是否与返回响应的URL一起工作?我怀疑“Not Found”(未找到)是返回404响应的消息。Glenn,这很有效,非常有趣……您是否使用
https://postman-echo.com/post
只是为了验证它是否与返回响应的URL一起工作?我怀疑“未找到”是返回404响应的消息。Glenn,有效,非常有趣。。。