package main
import (
"fmt"
"io"
"time"
"httpclient"
)
func main() {
client := httpclient.NewClient(
10*time.Second,
3,
1*time.Second,
)
headers := map[string]string{
"Content-Type": "application/json",
"Authorization": "Bearer your-token-here",
}
resp, err := client.Get("https://api.example.com/data", headers)
if err != nil {
fmt.Printf("Error: %v\n", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Printf("Status: %d\n", resp.StatusCode)
fmt.Printf("Body: %s\n", body)
}