forked from GithubBackups/healthchecks
feature: golang http get request changes to head
This commit is contained in:
parent
3d9261c7c4
commit
fbc217ef35
@ -1,4 +1,4 @@
|
||||
<div class="highlight"><pre><span></span><span class="nb">import</span> <span class="s1">"net/http"</span>
|
||||
<span class="nb">import</span> <span class="s1">"fmt"</span>
|
||||
<span class="nx">func main() { </span><span class="p">_, err := http.Get("PING_URL") }</span>
|
||||
<span class="nx">func main() { </span><span class="p">_, err := http.Head("PING_URL") }</span>
|
||||
</pre></div>
|
||||
|
@ -2,7 +2,7 @@ import "fmt"
|
||||
import "net/http"
|
||||
|
||||
func main() {
|
||||
_, err := http.Get("PING_URL")
|
||||
_, err := http.Head("PING_URL")
|
||||
if err != nil {
|
||||
fmt.Printf("%s", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user