Leveraging what jkusky entered for GET and POST, I've created a sample HTTP Delete function for the REST services in Cortex.  

The function requires a few parameters that are not listed

1.  URI to the "page" your are attempting to DELETE. Example: "http://myISE/storage/volumes/{id}"; where {id} is the instance identifier of the resource you want to delete

Be careful!  Using this primitve to delete a resource will not ask "are you sure?" first.


---------------------------------------------------

function Execute-HTTPDeleteCommand()

 {

param(

[string]$target = $null

)

$username = "administrator"

$password = "mypass"

$webRequest = [System.Net.WebRequest]::Create($target)

$webRequest.ServicePoint.Expect100Continue = $false

$webRequest.Credentials = New-Object System.Net.NetworkCredential -ArgumentList $username, $password

$webRequest.PreAuthenticate = $true

$webRequest.Method = "DELETE"

$requestStream = $webRequest.GetRequestStream()

$requestStream.Close()

 


    [System.Net.WebResponse]$resp = $webRequest.GetResponse();

    $rs = $resp.GetResponseStream();

    [System.IO.StreamReader]$sr = New-Object System.IO.StreamReader -argumentList $rs;

    [string]$results = $sr.ReadToEnd();

    return $results;


 }

------------------------------------------------------

To use the function, add the required variables and call the function

-------------------------------------------------------------

$URL = http://myise/storage/volumes/12345

Execute-HTTPDeleteCommand $URL

 This will delete Volume with GUID = 12345

--------------------------------------------------------

 Have fun!