Not sure, sorry. I've (thankfully) never had to deal with sharepoint integrations via ignition.
After a quick google search:
I would try the first response using EntityUtils.toByteArray
with an import statement of from org.apache.http.util import EntityUtils
No clue if this will actually work though