OHHTTPStubs

Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!

MIT License

Stars
5K
Committers
71

Bot releases are hidden (Show)

OHHTTPStubs - 9.1.0 Latest Release

Published by jeffctown almost 4 years ago

  • Added hasFormBody(_:) matcher.
    @417-72KI
  • Added fix for Xcode 12 - Warnings related to iOS 8 support (Swift Package Manager) #328
    @kikeenrique
OHHTTPStubs - 9.0.0

Published by jeffctown over 4 years ago

  • Added support for Swift Package Manager and dropped OH from all class names.
    @jeffctown
OHHTTPStubs - 8.0.0

Published by jeffctown over 5 years ago

  • Update default Swift Version to 5.0
    @croig
OHHTTPStubs - 7.0.0

Published by jeffctown over 5 years ago

  • Updating default Swift Version to 4.2.
    @jeffctown
  • Updating example projects to Swift 4.2 and Xcode 10.1.
    @jeffctown
  • Updating iOS Lib Tests to have a minimum iOS version of 8.0.
    @jeffctown

Notes:

  • Bumping this version to 7.0.0 because it's now using the Swift 4 APIs.
  • This version is still compatible with Swift 3.x when integrating with CocoaPods, as CocoaPods uses the same SWIFT_VERSION as your app project does so it adapts automatically and it's transparent for users.
  • If you're using Carthage and need Swift 3.x compatibility, you can follow the tips in the installation instructions of the README.md.
  • CI is now only testing Swift 4.x on Xcode 9.1 and 10.1.
  • Thank you to @hellensoloviy, @robertoferraz, @rckoenes, @NikSativa for their pull requests updating Swift!
OHHTTPStubs - 6.2.0

Published by jeffctown over 5 years ago

  • Enabled application extension API only.
    @lightsprint09
  • Disabled a flaky redirect test and adding the known issue with redirects to the README.
    @jeffctown
    #301
  • Added isMethodHEAD() to the Swift helpers.
    @Simon-Kaz
    #294
  • Fixed issue with not preserving correct headers when following 3xx
    redirects.
    @sberrevoets
OHHTTPStubs -

Published by AliSoftware almost 7 years ago

  • Updated deployment target for the pod to 7.0 to remove warning for old APIs.
    @AliSoftware
  • Fixed HTTP Method retention for 301,302,307,308 status redirects.
    @mikelupo
  • Added hasJsonBody(_:) matcher.
    @pimnijman
  • Added onStubMissing to report missing stubs.
    @c1ira
    #264
  • Fixed URLRequest.ohhttpStubs_httpBody function in Swift 3 and 4.
    @mplorentz
  • Added absolute url matcher.
    @victorg1991
    #254
  • Fixed up empty lines with whitespace inside test case classes.
    @mikelupo
    #251
  • Fixed potential memory leaks with use of NSURLSession as detected by our devs.
    @mikelupo
    #250
  • Add precondition assertions in isScheme and isHost matchers and some documentation in isHost, isScheme and isPath.
    @Liquidsoul
    #248
OHHTTPStubs -

Published by AliSoftware over 7 years ago

  • Made Swift 3 the default. master is now compatible with 3.0 and 3.1.
    @Liquidsoul
    @cohilla
    #240
  • The pod 'OHHTTPStubs/Swift' subspec now includes the URLSession and JSON subspecs.
    @AliSoftware
  • Added some matchers to the Swift APIs: hasBody(…), pathEndsWith(…) and pathMatches(…).
    @AliSoftware

Notes:

  • Bumping this version to 6.0.0 because it's now using the Swift 3 APIs,
    but in practice it's entirely retro-compatible with previous 5.2.3-swift3 branch
  • This version is still compatible with Swift 2.3 when integrating with CocoaPods, as CocoaPods uses the same SWIFT_VERSION as your app project does so it adapts automatically and it's transparent for users.
  • If you're using Carthage though, we stopped providing Swift-2.3-specific branches ourselves (too much maintainance work), but if you still need Swift 2.3 compatibility, you can follow the tips in the installation instructions of the README.md.
OHHTTPStubs -

Published by AliSoftware almost 8 years ago

  • Reverted #216 until better solution, as it was never active and can't make it compile for all subspec configurations.
  • Improved documentation about dynamicType: vs type(of:).
    Antondomashnev
    #221
  • Fixed a race condition that occasionally prevented redirect callbacks.
    @morrowa
    #224
  • Fixed response timing for zero-length stub data.
    @morrowa
    #224
OHHTTPStubs -

Published by AliSoftware almost 8 years ago

This is the same release as 5.2.3 below, except it has SWIFT_VERSION=3.0 set in the Xcode project so that Carthage users already using Swift 3 can build it with this configuration.

The sample projects also have been updated to Swift 3 in this branch.

Users of CocoaPods are not impacted by this and can use the main 5.2.3 version — this tag is only useful for Carthage users (until Carthage/#1445 is fixed)

OHHTTPStubs -

Published by AliSoftware almost 8 years ago

This is the same release as 5.2.2 below, except it has SWIFT_VERSION=3.0 set in the Xcode project so that Carthage users already using Swift 3 can build it with this configuration.

The sample projects also have been updated to Swift 3 in this branch.

Users of CocoaPods are not impacted by this and can use the main 5.2.2 version — this tag is only useful for Carthage users (until Carthage/#1445 is fixed)

OHHTTPStubs -

Published by AliSoftware almost 8 years ago

OHHTTPStubs -

Published by AliSoftware about 8 years ago

This is the same release as 5.2.1 below, except it has SWIFT_VERSION=3.0 set in the Xcode project so that Carthage users already using Swift 3 can build it with this configuration.

Users of CocoaPods are not impacted by this and can use the main 5.2.1 version, this tag is only useful for Carthage users (until Carthage/#1445 is fixed)

OHHTTPStubs -

Published by AliSoftware about 8 years ago

Reminder that this version is source-compatible compatible with ObjC, Swift 2.2, 2.3 and 3.0 all in master. You you're using CocoaPods you can use 5.2.0 directly. But if you're using Carthage, which builds the framework from the Xcode project, you should use the swift3 branch — whose only diff is the SWIFT_VERSION build setting being set to 3.0.

Note for Carthage users: The OHHTTPStubs.framework.zip pre-build binary is intentionally not included in this release, because we're in a transition period between Swift 2.2, 2.3 and 3.0. Carthage only let us provide one pre-build binary per version while we'd need one for each Swift ABI during that transition period.
For more info, see the dedicated paragraph in README.

OHHTTPStubs - 5.2.0 + Swift 3 enforced for Carthage

Published by AliSoftware about 8 years ago

This is the same release as 5.2.0 below, except it has SWIFT_VERSION=3.0 set in the Xcode project so that Carthage users already using Swift 3 can build it with this configuration

OHHTTPStubs - 5.2.0: Swift 2.3 & 3.0 support

Published by AliSoftware about 8 years ago

  • Added Swift 2.3/Xcode 8 support. This is compatible both Swift 2.2/Xcode 7.3 and Swift 2.3/Xcode 8.
    @ikesyo, #184
  • Added Swift 3.0 support.
    @mxcl, @Liquidsoul, #192
  • Set deployment targets at the project level to be used in a universal target.
    @ikesyo, #185
  • Fix: Carthage support and Examples configurations.
    @Liquidsoul, #190

Note for Carthage users: The OHHTTPStubs.framework.zip pre-build binary is intentionally not included in this release, because we're in a transition period between Swift 2.2, 2.3 and 3.0. Carthage only let us provide one pre-build binary per version while we'd need one for each Swift ABI during that transition period.
For more info, see the dedicated paragraph in README.

OHHTTPStubs -

Published by AliSoftware over 8 years ago

  • Bugfix: task completion block never called when not following redirects.
    @adurdin, #175
  • Declare in the project settings that the library contains swift code.
    @rodericj, #173
  • Adjusted parsing of Mocktail files to allow headers to start on line 4.
    @Ashton-W, #172
  • Allows access to the HTTPBody of POST request when using NSURLSession
    (Wiki entry)
    @iosphere, #166 #180
OHHTTPStubs -

Published by AliSoftware over 8 years ago

  • Added pathStartsWith(_:) to the Swift helpers.
    @sdduursma, #163
  • Added more logging blocks for debugging and better insight into when OHHTTPStubs returns stubs and redirects.
    @jzucker2, #161
  • Added matchers that check whether a request has a particular header present, and a matcher to check if a request has a header with a key and value.
    @hq-mobile, #160

Note that this last change also changed the signature of the onStubActivation: (hence the bump to 5.0.0) so you'll have to update your code if you used this for debugging your stubs.

OHHTTPStubs -

Published by AliSoftware over 8 years ago

  • Added isEnabled and isEnabledForSessionConfiguration getter methods.
    @jzucker2, #159
OHHTTPStubs -

Published by AliSoftware over 8 years ago

  • Bumps OSX Deployment Target to 10.9 to add Swift support.
    @JeanAzzopardi, #154
  • Added the ${CURRENT_PROJECT_VERSION} to the Info.plist files of theOHHTTPStubs.framework so it matches what is expected by iTunes Connect.
    @siemensikkema, #140
OHHTTPStubs -

Published by AliSoftware almost 9 years ago

  • Added isMethodPATCH() to the Swift helpers.
    @attheodo, #145
  • Fixed nullability annotation on onStubActivation: method parameter.
    @DerLobi, #144