Skip to content

Releases: immobiliare/RealHTTP

1.8.3

28 Feb 15:40
Compare
Choose a tag to compare

2023-02-28

  • [NEW] #85 Added Set-Cookie option in HTTPHeaders
  • [FIX] #84 Fix download percentage not always getting to 1 due to rounding errors

1.8.2

17 Feb 16:02
757eda1
Compare
Choose a tag to compare

2023-02-17

FIXES

  • [#82] Cookies set in Set-Cookie header are now printed in cURLDescription() (along with any set in NSHTTPCookieStorage)

1.8.1

07 Dec 16:37
Compare
Choose a tag to compare

2022-12-07

FIXES

  • [#75] Fixed a memory leak with HTTPClient's .delegate property which is not marked as weak.

1.8.0

27 Nov 16:56
51697c0
Compare
Choose a tag to compare

2022-11-27

NEW FEATURES

  • [#69] Added a new retry strategy (.afterTask(TimeInterval, RetryTask, RetryTaskErrorCatcher?)) to allow performing an async task before retrying the original request. With this new option is possible to perform work outside RealHTTP and inject whatever you need into the original request.
  • [#73] Added an explicit option for specifying boolean and array encoding strategies when adding parameters in bulk via formURLEncodedBody() function.
  • [#72] All methods and properties of HTTPAltRequestValidator are now marked as open to allow further customization of the validation behaviors.

FIXES

  • [#68] Removed warning for withTaskCancellationHandler() method in HTTPDataLoader in Swift 5.5. Also fixed the test_largeFileTestResume() unit test
  • [#70] Fixed the match(URL:) (with .ignoreQueryParameters) HTTPStubber function, which failed to match an URL when the port is explicitly set.

CONTRIBUTORS

  • Thanks to @frajaona for the new retry request strategy in #69
  • Thanks to @nashfive for suggestion about #73
  • Thanks to @aetherealtech for the report about the bug with stubber in #70
  • Thanks to @NicFontana for fixing large download's unit test and the squash of continuation function deprecation in #68

1.7.4

24 Oct 15:46
Compare
Choose a tag to compare

2022-10-24

New

  • [#66] HTTPStubber's match() function is now public and can be used to test for a matched stub request.

1.7.3

09 Oct 08:41
Compare
Choose a tag to compare

2022-10-09

Fixes

  • [#62] Fixed an issue with headers values priority override when setting a request body to replace any previously customized headers collection both from parent client's headers and specific requests headers. See #63 for more details.

1.7.2

23 Sep 09:59
Compare
Choose a tag to compare

2022-09-23

Fix

  • [FIX #61] Fix occasional crash at startup with the URLProtocol subclass for RealHTTP Stubber HTTPStubURLProtocol

1.7.1

09 Sep 05:46
Compare
Choose a tag to compare

2022-09-09

Fix

  • [NEW] #60 Temporary disabled SwiftLintPlugin due to a bug with Xcode 13.4.1 and SPM

1.7.0

05 Sep 05:42
Compare
Choose a tag to compare

2022-09-05

New Features / Enhancements

  • [NEW] Added ability to set responseTime on HTTPStubResponse to simulate different network conditions

Example:

let mock = try HTTPStubRequest()
           .match(urlRegex: "(?s).*")
           .stub(for: .get, {
                $0.statusCode = .ok
                $0.responseTime = .withSpeed(.speed1kbps) <--- SIMULATE A VERY SLOW NETWORK
                $0.body = ...
                $0.headers = [
                    ...
                ]
         })

Fixes

  • [FIX] #59 - Fixed crash in HTTPMetrics : Attempted to dereference garbage pointer
  • [FIX] #58 - Fix for HTTPDataLoader crashes decrementStrong (line 438)
  • [FIX] #57 - Fix for waitForStatusRecordUnlock crash, thread lock

NOTICE

RealHTTP built-in stubber will soon be removed from this package into a separate package. No changes at APIs level will be applied.

1.6.2

23 Jul 10:16
Compare
Choose a tag to compare

2022-07-23

New Features / Enhancements

  • [FIX] #56 - HTTPClient and URLSessionTask are incorrectly removed after the download, also breaking the cURLDescription() output.