package system

import (
	"encoding/json"
	"floares/lib/model"
	"log"
	"net/http"
)

func Info() model.Info {
	req, _ := http.NewRequest("GET", "http://127.0.0.1:8888/info", nil)
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		log.Println("request for info list error:", err)
		return model.Info{}
	}
	var result model.Info
	err = json.NewDecoder(res.Body).Decode(&result)
	return result
}
