I am trying to output to console a json object that is being returned when I call the URL:
http://localhost:999/api/randomObjects/19
where randomObjects is the type of object and 19 is the object ID. So far, the only way I have gotten the json to output to the console in powershell is using webclient and saving the json to a folder then outputting it.
$storageDir = "C:\Path\to\folder"
$webclient = New-Object System.Net.WebClient
$url = "http://localhost:999/api/randomObjects/19"
$file = "$storageDir/demofile.json"
$webclient.DownloadFile($url,$file)
cat $file
Is there a way to directly output the json object to console without saving it in a file?