powershell utf8 curl

时间:2020-06-08 19:46:38   收藏:0   阅读:47

powershell curl utf-8  乱码

$body = ‘{“users”:[“yang.sun”],”msg”:”‘ +  “中文字符串”  +‘”}’

#使用此命令可以将,将要发送的内容转为utf-8编码方式【指定编码方式可转换为任何方式】。

[array]$params =[System.Text.Encoding]::UTF8.GetBytes($body)
curl -Uri “uri; -Method Post  -ContentType “application/json” -Body $params 

 

原文:https://www.cnblogs.com/bro-ma/p/13067718.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!