Golang net/http.ProxyURL() function example
package net/http
Golang net/http.ProxyURL() function usage example
proxyUrl, err := url.Parse("http://ip-address:port")
http.DefaultTransport = &http.Transport{
Proxy: http.ProxyURL(proxyUrl)
}
Reference :
Advertisement
Something interesting
Tutorials
+10.6k Golang : Simple File Server
+18.5k Golang : Set, Get and List environment variables
+10.1k Golang : Compare files modify date example
+11.3k Golang : Intercept and process UNIX signals example
+5.7k Linux/Unix/PHP : Restart PHP-FPM
+36.6k Golang : Validate IP address
+9k Golang : automatically figure out array length(size) with three dots
+11.6k Golang : Convert(cast) float to int
+21.2k Golang : Convert(cast) string to rune and back to string example
+21.2k Golang : How to force compile or remove object files first before rebuild?
+17.4k Golang : Get future or past hours, minutes or seconds
+18.5k Golang : Send email with attachment