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.5k Golang : If else example and common mistake
+12.5k Golang : HTTP response JSON encoded data
+12.2k Golang : Get remaining text such as id or filename after last segment in URL path
+10.6k Golang : Select region of interest with mouse click and crop from image
+7.9k Javascript : How to check a browser's Do Not Track status?
+20.6k Nginx + FastCGI + Go Setup.
+12.3k Golang : Validate email address
+8.2k Golang : Routes multiplexer routing example with regular expression control
+13.1k Golang : List objects in AWS S3 bucket
+9.1k Golang : Serving HTTP and Websocket from different ports in a program example
+11k Golang : Create S3 bucket with official aws-sdk-go package
+9.2k Golang : How to control fmt or log print format?