{"id":75,"date":"2016-10-12T09:57:17","date_gmt":"2016-10-12T09:57:17","guid":{"rendered":"http:\/\/172.23.1.43\/?p=75"},"modified":"2022-06-07T22:26:30","modified_gmt":"2022-06-07T22:26:30","slug":"powershell-non-latin-language-with-rest","status":"publish","type":"post","link":"https:\/\/blog.n-dol.org\/2016\/10\/12\/powershell-non-latin-language-with-rest\/","title":{"rendered":"PowerShell \u2013 Non latin language with REST"},"content":{"rendered":"\n
#HTTP Headers building\n$ContentType= 'application\/json; charset=utf-8'\n$headers = @{"tenant-code" = $tenantAPIKey; "Authorization"= $BasicCredentials} \n\n$Message = @{\n MessageBody = "?????? ?? ???????"\n MessageType = "String"\n}\n\n#Convert to JSON Depth at 10 ensure correct convertion for long text\n$MessageInJSON = $Message | ConvertTo-Json -Depth 10 \n\n#Convert Message to UTF-8 encoding\n$Body = [System.Text.Encoding]::UTf8.GetBytes($MessageInJSON)\n\n#Sending Message using Rest\n$Output = Invoke-RestMethod -Method Post -Credential $Credentials -Uri $URI -Body $Body -ContentType $ContentType -Headers $headers<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":5614970,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[178495],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts\/75"}],"collection":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/users\/5614970"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":4,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":1419,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/posts\/75\/revisions\/1419"}],"wp:attachment":[{"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.n-dol.org\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}