package main import ( "fmt" "net/http" "net/url" "io/ioutil" ) func getRSS(s string) string { u, _ := url.Parse(s) q := u.Query() for k, _ := range u.Query() { q.Del(k) } q.Set("hoge", "fuga") u.RawQuery = q.Encode() return u.String() } func handler(w http.ResponseWriter, r *http.Request) { r.ParseForm() url := getRSS(r.Form["u"][0]) resp, _ := http.Get(url) defer resp.Body.Close() byteArray, _ := ioutil.ReadAll(resp.Body) fmt.Fprint(w, string(byteArray)) } func main() { fmt.Println("Start Server ...") http.HandleFunc("/", handler) http.ListenAndServe(":8080", nil) }