Method for getting documents via cURL