Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ping JSON API in Golang
package main
import (
func main() {
url := ""
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-host", "")
req.Header.Add("x-rapidapi-key", "472e13f6d7msh84492a2444096d4p1edbffjsn3ff4c1075778")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.