Releases: AliSoftware/OHHTTPStubs
Releases · AliSoftware/OHHTTPStubs
2.3.1
- Fixed bug with OHHTTPStubsResponse+JSON when
nilheaders dictionary
2.3.0 — Naming your stubs + debugging methods
- Added the ability to give a name to a stub, for debugging purposes (property
nameofid<OHHTTPStubsDescriptor>) - Added
allStubsmethod to list all installed stubs (with their name if they have one, see previous point) - Added
+[OHHTTPStubs onStubActivation:]method to execute arbitrary code each time a stub is activated. Useful to log which stub is used for each request for example.
2.2.1 — Migrated implementation to NSInputStream
- Complete refactoring to use
NSInputStreaminstead of direct use ofNSData(Thanks to @kcharwood - #28) - Some other code refactoring to split the code in categories and make it clearer
- Some API changes to make
OHHTTPStubsto fit the new possibility of setting bothrequestTimeandresponseTime.- Old API is still there but deprecated, and will be removed in next major version
- To convert to the new API, you will mainly simply:
- extract the
responseTime:parameter to a method call of its own (return [OHHTTPStubsResponse responseWithData:data statusCode:code responseTime:time headers:header];will becomereturn [[OHHTTPStubsResponse responseWithData:data statusCode:code headers:headers] responseTime:time];etc.) - convert
responseWithFile:filenametoresponseWithFileAtPath:OHPathForFileInBundle(filename,nil)
- extract the
2.0.0 — Simplified API
- Simplified API
- removed instance methods, no more public
sharedInstance: directly call class methods on theOHHTTPStubsclass - The old and problematic
addRequestHandler:method has been deprecated and should not be used anymore. UsestubRequestsPassingTest:withStubResponse:instead, which is more efficient
- removed instance methods, no more public
- Added API documentation in the headers
- Remove all internal uses of Apple's private APIs
Be careful: if you forgot to remove your use of
OHHTTPStubsand your stubs from the binary you sent to the AppStore, your app would have been rejected by Apple before 2.0.0, as it was using private API (which was a way to make sure not to forget to remove them), but now it would be accepted silently. So don't forget to remove your stubs andOHHTTPStubsfrom your final binary!