This commit is contained in:
parent
f4d7d7c241
commit
e31a184f97
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
@ -115,7 +114,7 @@ func main() {
|
||||||
githubactions.Fatalf("error %s", err.Error())
|
githubactions.Fatalf("error %s", err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("retrieved data: %s", string(jsonStr))
|
// log.Printf("retrieved data: %s", string(jsonStr))
|
||||||
|
|
||||||
req, err := http.NewRequest("POST", webhook, bytes.NewBuffer(jsonStr))
|
req, err := http.NewRequest("POST", webhook, bytes.NewBuffer(jsonStr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -131,6 +130,7 @@ func main() {
|
||||||
fmt.Println("response Status:", resp.Status)
|
fmt.Println("response Status:", resp.Status)
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
fmt.Printf("response: %+v\n", resp)
|
fmt.Printf("response: %+v\n", resp)
|
||||||
|
fmt.Printf("data: %+v\n", jsonStr)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue