Leveraging what jkusky entered for GET and POST, I've created a sample HTTP Options 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 OPTIONS to. example: "http://myISE/storage/volumes".

Executing the HTTP OPTIONS method will return the available HTTP Methods that a particular resource allows.  The return location is actually in the HTTP Response Header, so the code will be a little bit different.


function Execute-HTTPOptionsCommand()



[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 = "OPTIONS"

$requestStream = $webRequest.GetRequestStream()



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

    $header = $resp.Headers; 

    $rs = $resp.GetResponseStream();

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

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

    return "Allow: " + $header[0] + $results;



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


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

Execute-HTTPOptionsCommand $URL


Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS {plus XSD information afterward}

You will also see the XSD in the response body for the OPTIONS request as well appended to the end of the "Allow: " header info.


Have fun!