Releases: go-resty/resty
Releases · go-resty/resty
v2.4.0 Release
Release Notes
Features
- Added a new
OnError
hook that is called when a Resty request returns an error PR #398 @justenwalker
Enhancements
- Preserve marshal errors in middleware request body handler #361, PR #362 @moorereason
- Added go.sum to the project PR #375 @moorereason
- Added Request Attempt and Remote IP Address in TraceInfo #352, #370, PR #374 @jeevatkm
- Added
HeaderAuthorizationKey
in theClient
struct, it can be configured #387 PR #403 @jeevatkm - Added
SetPathParam
method inClient
sndRequest
for setting single path param #402 PR #403 @jeevatkm - Added option of
http.NoBody
when content length is settrue
and request body is nil #395 PR #403 @moorereason @jeevatkm
Bug Fixes
- Fixed - Trace timing issue when reused connections #346 PR #347 @moorereason
- Fixed - Request, execute user defined middlewares after resty's internal middlewares PR #355 @lggomez
- Fixed - Incorrect response time when saving the response file PR #357 @iwaltgen
- Fixed - Set supplied argument value to the field PR #368 @lewisay
- Fixed - Body size 0 when HTTP status code is 307, 308 #300 PR #380 @shiguangyin
- Fixed - Travis Build issue, many PRs are waiting PR #366 @jeevatkm
- Fixed - Retry sleep computation for 32bit arch PR #388 @creekorful
Documentation
- Added clarification on Request.RawRequest PR #354 @lggomez
- Godoc update - typo correction PR #363 @Alex1996a
- Corrected typo in AddRetryCondition function, readme example #365 PR #364 @ervitis
- Added ForceContentType example PR #371 @mattfenwick
- Added Resty package for Client and Response PR #378 @cxjava
- Godoc update on Readme for retry condition func PR #390 @lambdalisue
v2.3.0 Release
Release Notes
New Features
Enhancements
- Improving retry total value PR #322 @golemiso
- Added force content type option for automatic unmarshalling #240, #276, PR #323 @jeevatkm
- Make default retry not on middlewares errors PR #333 @lrita
- Add SetMultipartFormData func to Request PR #337 @ArcticSnowman
- Add types for middleware PR #341 @mloberg
Bug Fixes
- Addressing the issue of traceinfo totaltime #304, PR #321 @jeevatkm
- Changes to show the right amount of time in Trace inf PR #331 @JoaquinJimenezGarcia
- Fixed Debugf call in Request/Response logger PR #335 @phsym and @pierresy
- Addressing nil pointer error while accessing cookie jar on user provided http client #330, PR #340 @jeevatkm
- Addressing HTTP2 issue on go1.13 above #339, PR #340 @jeevatkm
- Fix TraceInfo on failed connections #338, PR #342 @moorereason
v2.3.0-rc.2
Next release candidate 😄
v2.3.0-rc.1
First release candidate for v2.3.0.
v2.2.0 Release
Release Notes
Enhancements
- Added
Request.Send()
method to execute Request as-is PR #286 @dan-rising - Applied
debugBodySizeLimit
to Request debug logger PR #297 @viennadd - Added
SetRootCertificateFromString
method to read cert from string PR #313 @dzaytsev91
Bug Fixes
- Fixed - Trace context overrides request context if
EnableTrace
#285, PR #284 @xixinjie - Fixed - Failing first request and successfully retrying carries error from first #289, PR #290 @phillc
- Fixed - Panic When Calling TraceInfo But Tracing Has Not Been Enabled #293, PR #296 @JonnyPillar
Documentation
- Added awesome go badge PR #280 @kishaningithub
- Godoc and readme typo correction PR #310 @creekorful
v2.1.0 Release
Release Notes
Enhancements
- Added support for func
http.Request.GetBody
, so request body manipalation can be done viaPreRequestHook
(such as adding Content-MD5 entity-header, etc) #242 @jeevatkm - Added
SetCookie
andSetCookies
method added intoRequest
object #257 @jeevatkm - Updated default JSON request content-type value without charset per RFC e.g.,
application/json
#258 @jeevatkm - Reducing memory allocation during debug log processing PR #277 @vivekv96
- Code improvements @jeevatkm
Bug Fixes
v2.0.0 Release
Release Notes
How to use Resty v2?
Please refer to README
New Features
- Dial a TCP connection from a specific Local Interface/IP Address #226 @jeevatkm
- On-Demand Resty Request/Responce tracer, #216 @jeevatkm, see TraceInfo, see Client.EnableTrace and see Request.EnableTrace - idea born from @moorereason example gist
- New
RetryAfterFunc
addition into Resty's retry capabilities PR #237 @neganovalexey, see RetryAfterFunc
Enhancements
- Build User-Agent string only once PR #221 @moorereason
- Retry Backoff algorthim and follow enhancement PR #237 @neganovalexey
- Log request and response debug log together for easy debugging, its highly helpful for parallel #218 @jeevatkm
- Default values set while
http.Transport
creation simliar to Langauge default client #212 @jeevatkm- Timeout, KeepAlive, MaxIdleConns, IdleConnTimeout, TLSHandshakeTimeout, ExpectContinueTimeout, MaxIdleConnsPerHost
- Added support to
multipart/form-data
payload without filename and content type values PR #236 @larryhu - Added HTTP verb
PATCH
into multipart support #239 @jeevatkm
Breaking Changes - Migrating v1.x to v2
- Resty v2 import path have changed to
github.com/go-resty/resty
#215 @jeevatkm- Resty v1 import path is not affected.
- Resty Default Client approach have been removed. Create an instance of Resty client with appropriate settings for usage #232 @jeevatkm
PreRequestHook
signature have been updated tofunc(cl *Client, r *http.Request) error
#217 @jeevatkm- Retry condition function signature updated to
RetryConditionFunc func(*Response, error) bool
#237, #214 @neganovalexey, @jeevatkm - Resty v2 brings new
Logger
interface #229, refer to godoc @jeevatkm - Methods to accept type
url.Values
for Query string and Form data on Request struct #213 @jeevatkm- Refactored method from
Request.SetMultiValueQueryParams
toRequest.SetQueryParamsFromValues
- Refactored method from
Request.SetMultiValueFormData
toRequest.SetFormDataFromValues
- Refactored method from
v2.0.0-rc.4
adding v2 go mod suffix and update dependency version
v2.0.0-rc.3
Third release candidate 😄
v2.0.0-rc.2
Second release candidate 😄