I'm not really sure why/if you meant to put this in the Module Development subcategory - it doesn't sound like that's the way you're leaning.
Never use system.net.httpGet/httpPost, always use system.net.httpClient.
There are some examples floating around this forum of doing digest auth via scripting, e.g:
Tangential, but MongoDB seems a very strange choice for binary file storage. NoSQL gives you no benefits if you're storing well formatted binary image snapshots.