Golang net/http.Head() function example
package net/http
Golang net/http.Head() function usage example
package main
import (
"fmt"
"net/http"
)
func main() {
resp, err := http.Head("http://golang.org")
if err != nil {
fmt.Println(err)
}
fmt.Println("Status : ", resp.Status)
}
output :
Status : 200 OK
Reference :
Advertisement
Something interesting
Tutorials
+6k Golang : Experimenting with the Rejang script
+20k Golang : How to run your code only once with sync.Once object
+26.8k Golang : Convert file content into array of bytes
+6k Golang : How to verify input is rune?
+7k Golang : Gargish-English language translator
+4.1k Javascript : Empty an array example
+6.8k Golang : Muxing with Martini example
+8.6k Golang : Progress bar with ∎ character
+16.3k Golang : Loop each day of the current month example
+21.1k Golang : Sort and reverse sort a slice of strings
+21.5k Golang : How to read float value from standard input ?