So first, I realized I have const https = require('http') which is wrong and probably resulted in this after changing to path:
undefined{"error":"Bad Request","status":400,"message":"Requests must be made over SSL"}
However, when I changed it to https, it came out with this error after waiting for about 10 seconds:
Error: socket hang up