Skip to content

Is there a cleaner way to await an https.get?

I stumbled across this post while looking for a way to await reading a file with fs. I was surprised that I hadn’t seen it anywhere else: Is there a way to use await in the same manner shown above, but for the ‘https’ library? I didn’t see anything like .promises and I was hoping to av…