Some checks are pending
StreamFlow CI/CD / Backend Tests (push) Waiting to run
StreamFlow CI/CD / Backend Lint (push) Waiting to run
StreamFlow CI/CD / Frontend Tests (push) Waiting to run
StreamFlow CI/CD / Android TV Build (push) Waiting to run
StreamFlow CI/CD / Docker Build (push) Blocked by required conditions
StreamFlow CI/CD / Docker Publish (push) Blocked by required conditions
32 lines
536 B
Go
32 lines
536 B
Go
package main
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"fmt"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
tr := &http.Transport{
|
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
|
}
|
|
client := &http.Client{
|
|
Transport: tr,
|
|
Timeout: 15 * time.Second,
|
|
}
|
|
|
|
url := "https://www.google.com/favicon.ico"
|
|
req, err := http.NewRequest("GET", url, nil)
|
|
if err != nil {
|
|
fmt.Printf("err: %v\n", err)
|
|
return
|
|
}
|
|
|
|
resp, err := client.Do(req)
|
|
if err != nil {
|
|
fmt.Printf("do err: %v\n", err)
|
|
return
|
|
}
|
|
fmt.Printf("status: %d\n", resp.StatusCode)
|
|
}
|