code: function getContent() {
        var h = pageInformation.response.headers || {};
        if (/json/.test(h['content-type'])) {
          try {
            return JSON.parse(page.plainText);
          }
          catch (e) {
            return page.content;
          }
        }
        else {
          return page.content;
        }
      }
docs: Helpers
   Get correct page content