Script.Util for the REST API
Now, as some of you may be saying to yourselves (or yelling it at this book), Hey! WSProxy is based on the Script.Util object!, and you would be 100% right. That being said, though, as we already went over WSProxy before this section, we will explore the rest of the object as it relates to the REST API.
Even those who may be familiar with SSJS and the Platform library may be scratching their heads and wondering what this crazy person is talking about. But we promise you it is there in the documentation; it is just hidden inside the Content Syndication section. Inside this section, three objects ARE listed:
Script.Util.HttpResponse
Script.Util.HttpRequest
Script.Util.HttpGet
As these objects and functions are fairly unknown, we are going to be spending a bit more time explaining them than we did the others. First, we will dig into the HttpResponse
object.