rodesousa
1/10/2018 - 4:20 PM

golang_print_bytes

package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	resp, _ := http.Get("https://gitlab.com/api/v4/groups/1768437?private_token=XX")
	defer resp.Body.Close()
	body, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(body))
}