【发布时间】:2019-09-26 14:46:48
【问题描述】:
当我通过 powershell 向 rest api Postmarkapp 发送请求时,出现这些错误
当使用metod get时
Invoke-RestMethod : Cannot send a content-body with this verb-type.
当使用metod post时
Server Error in '/' Application. The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /deliverystats
脚本
$Uri = 'https://api.postmarkapp.com/deliverystats'
Invoke-RestMethod $Uri -Method Post -Headers @{'X-Postmark-Server-Token' =" Token" } -ContentType "application/json" |
【问题讨论】:
-
您是否尝试过使用
curl指定here 来测试您的请求?
标签: powershell postmark