sync-request-curl
Advanced tools
Comparing version 1.3.9 to 1.3.10
@@ -11,7 +11,10 @@ "use strict"; | ||
queryParams.delete(key); | ||
value.forEach((item, i) => queryParams.append(`${key}[${i}]`, item.toString())); | ||
value.forEach((item, i) => queryParams.append(`${key}[${i}]`, String(item))); | ||
} | ||
else { | ||
queryParams.set(key, value.toString()); | ||
else if (value === null) { | ||
queryParams.set(key, ''); | ||
} | ||
else if (value !== undefined) { | ||
queryParams.set(key, String(value)); | ||
} | ||
}); | ||
@@ -18,0 +21,0 @@ urlObj.search = queryParams.toString(); |
@@ -8,7 +8,10 @@ import { CurlCode } from 'node-libcurl'; | ||
queryParams.delete(key); | ||
value.forEach((item, i) => queryParams.append(`${key}[${i}]`, item.toString())); | ||
value.forEach((item, i) => queryParams.append(`${key}[${i}]`, String(item))); | ||
} | ||
else { | ||
queryParams.set(key, value.toString()); | ||
else if (value === null) { | ||
queryParams.set(key, ''); | ||
} | ||
else if (value !== undefined) { | ||
queryParams.set(key, String(value)); | ||
} | ||
}); | ||
@@ -15,0 +18,0 @@ urlObj.search = queryParams.toString(); |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.3.9", | ||
"version": "1.3.10", | ||
"files": [ | ||
@@ -10,0 +10,0 @@ "dist" |
@@ -55,3 +55,3 @@ # sync-request-curl | ||
const response = request('GET', 'https://comp1531quiz.alwaysdata.net'); | ||
const response = request('GET', 'https://comp1531namesages.alwaysdata.net'); | ||
console.log('Status Code:', response.statusCode); | ||
@@ -58,0 +58,0 @@ const jsonBody = JSON.parse(response.body.toString()); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34873
328