Skip to content

Releases: ThalesGroup/requester

Release 1.3.1

01 Sep 02:26
Compare
Choose a tag to compare

Bumped dependencies and fixed some linter issues.

v1.3.0

15 Feb 03:23
Compare
Choose a tag to compare
  • new: convenience functions for typical types of backoff: NoBackoff(), ConstantBackoff(), and ConstantBackoffWithJitter()
  • fix: error in docs for Middleware

v1.2.1

14 Feb 21:47
Compare
Choose a tag to compare
  • fix: MockResponse ensures response body is not nil
  • enhancement: ExponentialBackoff treats MaxDelay == 0 as unlimited
  • enhancement: ExponentialBackoff ensures delay will not exceed max, even if jitter is added
  • enhancement: docs

Release 1.2.0

21 May 21:42
Compare
Choose a tag to compare
  • httptestutil.Inspector learned Drain(), which returns all exchanges currently in the buffer.
  • RetryConfig learned ReadResponse, which tells Retry to try and read the entire response body into a buffer. If an error occurs while reading the response, the Retry middleware will attempt to retry. This allows retrying requests when reading the response body is flaky.
  • learned AllRetryers(), which combines multiple ShouldRetryers into one. All the combined ShouldRetryers must return true to retry the request. Useful for composing multiple retry criteria.
  • learned OnlyIdempotentShouldRetry(), which retries only of the request used one of the idempotent HTTP verbs, like GET.

Release 1.1.1

23 Mar 03:35
Compare
Choose a tag to compare
  • Retry middleware retries on EOF errors

Release 1.1.0

15 Mar 04:00
Compare
Choose a tag to compare

Added Retry middleware. This middleware retries the request if possible. Configuration can control when retries should be attempted, and how long to wait between them. A configurable, exponential backoff is provided.

Release 1.0.3

29 Jan 20:56
Compare
Choose a tag to compare

Replaces MultiUnmarshaler with ContentTypeUnmarshaler. The new Unmarshaler is more configurable, and can use content type suffixes to match unmarshlers. For example, "application/vnd.api+json" will first look for an unmarshaler registered for that entire value. Failing that, it will look for "application/json".

ContentTypeUnmarshaler is complete backward compatible with MultiUnmarshaler, so MultiUnmarshaler is now just a type alias for ContentTypeUnmarshaler.

Release 1.0.2

28 Jan 15:43
Compare
Choose a tag to compare

Fixed a bug in ExpectSuccessCode() which caused this to always return an error.

Release 1.0.1

17 Jan 21:33
df8dc97
Compare
Choose a tag to compare

Fixes an issue with ExpectCode and ExpectSuccessCode options: if you used multiple instances of these options, they all ran, which didn't make any sense. Multiple expectations would typically be mutually exclusive (you can't expect both code 200 and 201). Now, each application of either option replaces any prior instance of the option, as would be expected. This is more inline with how other options work.

Release 1.0.0

12 Feb 17:58
Compare
Choose a tag to compare

1.0.0 release, meaning the API is stable: backwards compatibility will be maintained until the next major release

Added

  • Range(): Sets the range header
  • AppendPath(): Adds path elements to the URL path, using slightly different
    rules than RelativeURL().