我不知道如何编写本文中描述的请求正文。
不管我的有效负载中是否有查询,我总是收到这个错误:
消息Invoke-RestMethod:{"$id":"1","innerException":null,“
”:“参数值无效。\r\n参数名称: queries","typeName":"Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException,innerException "typeKey":"InvalidArgumentValueException","errorCode":0,"eventId":0}
我正在尝试这样的事情:
$body= @{
queries=@(
@{
items=@(0,1,2)
type="commit"
}
)
results=@()
} | ConvertTo-Json
发布于 2018-08-17 03:31:11
我的json格式是正确的,但没有在末尾添加-depth是我的失败。
$body = @{
queries=@(
@{
items = @("xxxx")
type = "commit"
}
)
results=@()
} | ConvertTo-Json -Depth 5
https://stackoverflow.com/questions/51877658
复制相似问题