Overview

A simple Get request in GO (GoLang)

package main
import (
    "io/ioutil"
    "log"
    "net/http"
)

func main() {
    resp, err := http.Get("https://unfurl.io/api/v1/api_token=yourapitoken&preview?url=https://www.google.com")
    if err != nil {
        log.Fatalln(err)
    }
    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        log.Fatalln(err)
    }
    log.Println(string(body))
}