I am calling this api url with golang:
When you click the url you get a single valid response from open street maps.
When I call from golang, I get 10 results back, which are all invalid.
My code looks like:
var myResponse []OpenStreetMapResponse
request, err := http.NewRequest("GET", serviceUrl, nil)
request.Header.Set("Content-Type", "application/json")
client := &http.Client{}
response, err := client.Do(request)
defer response.Body.Close()
body, _ := ioutil.ReadAll(response.Body)
json.Unmarshal(body, &myResponse)
what am i doing wrong? this makes absolutely no sense. i can write this api call in about 4 different programming languages and I get the correct response, but golang is giving COMPLETELY different results. any help you can provide would be greatly appreciated.