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.6k Fix fatal error: evacuation not done in time problem
+5.8k Golang : Find change in a combination of coins example
+8k Findstr command the Grep equivalent for Windows
+21.1k Golang : Sort and reverse sort a slice of strings
+46.4k Golang : Encode image to base64 example
+5.6k Swift : Get substring with rangeOfString() function example
+7.5k Golang : Rot13 and Rot5 algorithms example
+36.3k Golang : Convert(cast) int64 to string
+12.7k Golang : Remove or trim extra comma from CSV
+8.8k Golang : Executing and evaluating nested loop in html template
+17.6k Golang : delete and modify XML file content