curl wrapper for external requests