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
+19.3k Golang : Get RGBA values of each image pixel
+7.1k Golang : Squaring elements in array
+10k Golang : Convert octal value to string to deal with leading zero problem
+8.3k Golang : Check if integer is power of four example
+21.2k Golang : Clean up null characters from input data
+12.8k Golang : Listen and Serve on sub domain example
+14.4k Golang : On enumeration
+22.5k Golang : Convert Unix timestamp to UTC timestamp
+4.7k Unix/Linux : How to pipe/save output of a command to file?
+39.6k Golang : Remove dashes(or any character) from string
+7.8k Golang : Scan files for certain pattern and rename part of the files