mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-08-31 00:19:45 +08:00
feature: tests
This commit is contained in:
+2
-2
@@ -4,9 +4,9 @@ var https = require('https')
|
||||
class Http {
|
||||
make(
|
||||
url: string,
|
||||
headers: string | null,
|
||||
body: string | null,
|
||||
ignoreCertificate: boolean | null
|
||||
headers: string | null = null,
|
||||
ignoreCertificate: boolean | null = false
|
||||
): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
fetch(
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ async function run() {
|
||||
|
||||
// make the request
|
||||
http
|
||||
.make(url, headers, body, insecure)
|
||||
.make(url, body, headers, insecure)
|
||||
.then(res => {
|
||||
// if the status code is not 2xx
|
||||
if (res.status >= 400) {
|
||||
|
||||
Reference in New Issue
Block a user