Skip to content

Instantly share code, notes, and snippets.

@RyanParsley
Last active May 9, 2018 22:04
Show Gist options
  • Save RyanParsley/abb1f0185826bc327ba57ef36028a749 to your computer and use it in GitHub Desktop.
Save RyanParsley/abb1f0185826bc327ba57ef36028a749 to your computer and use it in GitHub Desktop.
function cURL(cURL)
{
var params =
{
cVerb: "GET",
cURL: cURL,
oHandler:
{
response: function(msg, uri, e)
{
// HTTP 405 - Can't MKCOL if it exists!
if(e != undefined && e.error != 405) {
app.alert("Failed to MKCOL: "+ e);
} else {
var stream = msg;
var string = "";
string = SOAP.stringFromStream( stream );
createReport(string);
}
}
}
};
Net.HTTP.request(params);
}
function createReport(text)
{
var rep = new Report();
rep.size = 1.2;
rep.color = color.blue;
rep.writeText(text);
rep.open("My Report");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment