Sample code for 30+ languages & platforms
PowerShell

Example: Http.QuickGetSb method

Demonstrates the QuickGetSb method.

Chilkat PowerShell Downloads

PowerShell
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"

$success = $false

$http = New-Object Chilkat.Http

# Send the HTTP GET and return the content in a StringBuilder
$sb = New-Object Chilkat.StringBuilder
$success = $http.QuickGetSb("https://www.chilkatsoft.com/helloWorld.json",$sb)
if ($http.LastMethodSuccess -eq $false) {
    if ($http.LastStatus -eq 0) {
        # Communications error.  We did not get a response.
        $($http.LastErrorText)
    }
    else {
        $("Response status code: " + $http.LastStatus)
        $("Response body error text:")
        $($sb.GetAsString())
    }

    exit
}

# The downloaded content:
$($sb.GetAsString())
$("Success")