How to download a file from deluge?

How to download a file from deluge?

I have a function in deluge that downloads a packing slip from Zoho Inventory where the return value is a pdf file. 

  1. parameterMap = Map();
  2. parameterMap.put("package_ids",/*id*/);
  3. PackingSlip = invokeurl
  4.  [
  5. url :"https://inventory.zoho.com/api/v1/packages/print?organization_id=473837261"
  6. type :GET
  7. parameters:parameterMap
  8. connection:"packages_oauth"
  9. ];
The problem I have is that I want to download the pdf that gets returned from this API call but I'm not sure how to do that. Is there a way I can download this file from deluge?