Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 02 Jun 12:09
· 41 commits to main since this release

Changelog

  • 31776d7 refactor: ♻️ deprecate WithTimeout Option in favour of context timeouts
// before
c, err :=  rip.NewClient(
      host, 
      rip.WithDefaultHeaders(rip.Header{"x-api-key": os.Getenv("API_KEY_BLOGAPI")}),
      rip.WithTimeout(30)
)

// now
c, err :=  rip.NewClient(
      "https://dummyjson.com", 
      rip.WithDefaultHeaders(rip.Header{"x-api-key": os.Getenv("API_KEY_BLOGAPI")}),
)
[...]
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Millisecond)
defer cancel()

resp, err := c.NR().Execute(ctx, "GET", "/test")
// >> "https://dummyjson.com/test": context deadline exceeded