小编ssk*_*sk3的帖子

Powershell 调用 RestMethod 错误 415 不支持的媒体类型

我正在尝试Azure Table Storage API使用 Powershell执行,Invoke-RestMethod但它返回415 error

这是Powershell代码:

$accessKey = "accesskey"
$account_name = "storage account"
$table_name = "table storage"
$date = "Fri, 10 Nov 2017 00:47:55 GMT"
$api_version = "2015-12-11"
$table_url = "https://$account_name.table.core.windows.net/$table_name"
$data_type = "application/json"
$signature = "generated signature"
$body = @{
Address="Mountain View";
Age="23"
}
$json = $body | Convertto-JSON
$table_headers = @{
"x-ms-date" = $date
"x-ms-version" = $api_version
"Authorization" = "SharedKey $account_name`:$signature"
"Content-Type" = $data_type
}

Invoke-RestMethod -Method POST -Uri $table_url -Headers …
Run Code Online (Sandbox Code Playgroud)

powershell azure invoke-command azure-table-storage

6
推荐指数
1
解决办法
8566
查看次数

HTTP KeepAlive 可以作为 TCP KeepAlive 的替代品吗?

TCP KeepAlive 通过定期发送 ACK 来建立持久连接。HTTP KeepAlive 可以将连接用于多个请求。

对于持久连接,如果使用HTTP KeepAlive,则在HTTP KeepAlive超时期间连接将被保持。因此,如标题所述,HTTP KeepAlive 成为 TCP KeepAlive 的替代品。

那是对的吗?

tcp http keep-alive

6
推荐指数
1
解决办法
895
查看次数