Simple library for working with APIs with Azure AD authentication.
type response struct {
ID string `json:"id"`
Name string `json:"name"`
}
func main() {
var responseJSON response
token := azcore.AccessToken{}
res, err := GetJSON("https://example.com", token)
if err != nil {
fmt.Println(err)
}
jsonErr := json.Unmarshal([]byte(companyRes), &responseJSON)
if jsonErr != nil {
fmt.Println(jsonErr)
}
}