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
+11.2k Golang : Proper way to test CIDR membership of an IP 4 or 6 address example
+31.1k Golang : Calculate percentage change of two values
+12.3k Golang : 2 dimensional array example
+10k Golang : Get escape characters \u form from unicode characters
+7.7k Golang : Mapping Iban to Dunging alphabets
+6.1k Golang : Measure execution time for a function
+5.3k Javascript : Shuffle or randomize array example
+17.5k Golang : Linked list example
+22.4k Golang : How to read JPG(JPEG), GIF and PNG files ?
+9.7k Golang : Populate slice with sequential integers example
+9.4k Golang : Web(Javascript) to server-side websocket example
+7.1k Golang : Squaring elements in array