Golang net/http.PostForm() function example
package net/http
Golang net/http.PostForm() function usage example
package main
import (
"fmt"
"net/http"
"net/url"
)
func main() {
urlData := url.Values{}
urlData.Set("search_query", "pixar")
resp, err := http.PostForm("https://www.youtube.com/results?search_query=", urlData)
if err != nil {
fmt.Println(err)
}
fmt.Println("Status : ", resp.Status)
}
References :
Advertisement
Something interesting
Tutorials
+86.3k Golang : How to convert character to ASCII and back
+7.5k Golang : How to execute code at certain day, hour and minute?
+9.2k Golang : Convert(cast) string to int64
+9k Golang : Apply Histogram Equalization to color images
+20.3k Golang : Secure(TLS) connection between server and client
+35k Golang : Strip slashes from string example
+7.6k Golang : Regular Expression find string example
+12.7k Python : Convert IPv6 address to decimal and back to IPv6
+15.4k Golang : Get digits from integer before and after given position example
+5.7k Golang : Shuffle array of list
+17k Golang : How to tell if a file is compressed either gzip or zip ?
+7.3k Android Studio : AlertDialog to get user attention example