Version: v0.6.0 - Beta.  We welcome contributors & feedback.  THanks!

Net.httpPost

Net.httpPost($url, $postData, $headers = {})

Description

Send an HTTP GET request and get the body of the response as a string.

$url must be a URL TypeString.

$postData can be a string containing the raw POST body, or a Map, which will be converted to a URL-encoded string.

$headers is an optional map of HTTP request headers.

// Basic call
$content = Net.httpPost(url'http://example.com', { myVar: 1 });

// With headers
$headers = {
    'Cookie': 'sessionId=1234; otherCookie=1;'
};
$content2 = Net.httpPost(url'http://example.com', { myVar: 1 }, $headers);