URL encoding: Difference between revisions
Content deleted Content added
→{{header|AutoHotkey}}: AutoHotkey example added |
→{{header|Go}}: library change |
||
Line 110: | Line 110: | ||
import ( |
import ( |
||
"fmt" |
|||
"url" |
|||
"http" |
|||
"strings" |
|||
) |
) |
||
func main() { |
func main() { |
||
fmt.Println(url.QueryEscape("http://foo bar/")) |
|||
// http.URLEscape replaces ' ' with '+', so: |
|||
url = strings.Replace(url, "+", "%20", -1) |
|||
fmt.Println(url) |
|||
}</lang> |
}</lang> |
||