Answer the question
In order to leave comments, you need to log in
How to make a GET request in Golang?
Can you help me with a get request?
Функция
var agr1 := 1
var arg3 := 2
var agr3 := 3
var arg4 := 4
func get() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path
c := http.Client{}
resp, err := c.Get("http://127.0.0.1:8087/webapi/lua%20
if err != nil {
log.Println(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
w.WriteHeader(200)
w.Write(body)
})
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question