godprotocol 1.2.11 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/utils/services.js +4 -1
package/package.json
CHANGED
package/utils/services.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import http from 'http'
|
|
2
|
+
import https from 'https'
|
|
2
3
|
|
|
3
4
|
const post_request = (payload, cb) => {
|
|
4
5
|
// let options = {
|
|
@@ -29,7 +30,9 @@ const post_request = (payload, cb) => {
|
|
|
29
30
|
if(payload.data){
|
|
30
31
|
header["Content-Length"] = Buffer.byteLength(data)
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
+
|
|
34
|
+
let mod = process.env.VERCEL ? https : http
|
|
35
|
+
let req = mod.request(
|
|
33
36
|
header,
|
|
34
37
|
(res) => {
|
|
35
38
|
let data = "";
|