v0.2.0
Improvements:
-
NewClient
supports receiving a list ofOption
s that modify clients behavior.
Initial supported options are:HttpClient(*http.Client)
- set customhttp.Client
to be usedHeaders(map[string]string)
- set custom headers to use in every request (kudos: @Nightapes)UserAgent(string)
- set User-Agent identification to be used (#6). This is a shortcut for just settingUser-Agent
custom header
Deprecations:
NewCustomClient
is deprecated in favor ofNewClient(string, ...Option)
withHttpClient(*http.Client)
option.
This method will be removed in future versions.