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
+5.9k Golang : Use NLP to get sentences for each paragraph example
+7.7k Golang : Error reading timestamp with GORM or SQL driver
+7.7k Golang : Generate human readable password
+39.2k Golang : How to read CSV file
+9.9k Golang : Turn string or text file into slice example
+22.4k Golang : How to read JPG(JPEG), GIF and PNG files ?
+5.2k Golang : Customize scanner.Scanner to treat dash as part of identifier
+5.7k Golang : Struct field tags and what is their purpose?
+5.2k Golang : Print instead of building pyramids
+6.3k Javascript : Generate random key with specific length
+9.5k Golang : Accessing content anonymously with Tor
+26k Golang : Convert IP address string to long ( unsigned 32-bit integer )