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
+4.3k Golang : Converting individual Jawi alphabet to Rumi(Romanized) alphabet example
+9.9k Golang : Function wrapper that takes arguments and return result example
+10.8k Golang : Natural string sorting example
+9.8k Golang : Format strings to SEO friendly URL example
+37.5k Upload multiple files with Go
+3.6k Java : Get FX sentiment from website example
+21.4k Curl usage examples with Golang
+7.2k Golang : Check if one string(rune) is permutation of another string(rune)
+11.5k Use systeminfo to find out installed Windows Hotfix(s) or updates
+16.6k Golang : Generate QR codes for Google Authenticator App and fix "Cannot interpret QR code" error
+9.3k Golang : How to get username from email address
+5.2k Responsive Google Adsense