- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttps.go
More file actions
Latest commit
18 lines (16 loc) · 428 Bytes
/
Copy pathhttps.go
File metadata and controls
18 lines (16 loc) · 428 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main
import (
"net/http"
)
// Performs a complete HTTP(S) request to the destination.
funcHTTPS(dest*Destination) bool {
dest.Increment("connectivity.http", []string{})
_, err:=http.Get(dest.URL)
iferr!=nil {
dest.Increment("connectivity.http.error", []string{})
LogDestinationError(dest, "Failed HTTP GET", err)
returnfalse
}
dest.Increment("connectivity.http.success", []string{})
returntrue
}