Factor out HTTP request library.