26 lines
338 B
Go
26 lines
338 B
Go
package SpotifyGo
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"log"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewClient(y *testing.T) {
|
|
spotify := CreateClient(true)
|
|
|
|
resp, err := spotify.http.Get("https://google.com")
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
|
|
body, err := ioutil.ReadAll(resp.Body)
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
|
|
fmt.Printf(string(body))
|
|
|
|
}
|