Generates functions that make asynchronous HTTP calls and return promises.