Broke out to avoid duplication, as requested by mortenbra. Response is now passed around internally as a record, with a flag to indicate whether the BLOB or CLOB is relevant.
Added a function to ntlm_http_pkg to retrieve the URL as a BLOB.