Created
January 7, 2017 20:55
-
-
Save hdurdle/8a74bca3786a62702c4df2b47f63de5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory=$true)][string]$client, | |
[string]$title = "Test Title", | |
[string]$message = "Test Message" | |
) | |
$data = @{ | |
id = '1' | |
jsonrpc = '2.0' | |
method='GUI.ShowNotification' | |
params = @{ | |
title = $title | |
message = $message | |
} | |
} | |
$uri = 'http://' + $client + ':3005/jsonrpc' | |
$json = $data | ConvertTo-Json | |
$response = Invoke-RestMethod -Uri $uri -Method Post -Body $json -ContentType 'application/json' | |
$response.result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment