Sherlock Holmes of the networking layer. :male_detective:

Overview

ResponseDetective is a non-intrusive framework for intercepting any outgoing requests and incoming responses between your app and your server for debugging purposes.

Requirements

ResponseDetective is written in Swift 5.3 and supports iOS 9.0+, macOS 10.10+ and tvOS 9.0+.

Usage

Incorporating ResponseDetective in your project is very simple – it all comes down to just two steps:

Step 1: Enable interception

For ResponseDetective to work, it needs to be added as a middleman between your (NS)URLSession and the Internet. You can do this by registering the provided URLProtocol class in your session's (NS)URLSessionConfiguration.protocolClasses, or use a shortcut method:

// Objective-C

NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
[RDTResponseDetective enableInConfiguration:configuration];
// Swift

let configuration = URLSessionConfiguration.default
ResponseDetective.enable(inConfiguration: configuration)

Then, you should use that configuration with your (NS)URLSession:

// Objective-C

NSURLSession *session = [[NSURLSession alloc] initWithConfiguration:configuration];
// Swift

let session = URLSession(configuration: configuration)

Or, if you're using AFNetworking/Alamofire as your networking framework, integrating ResponseDetective comes down to just initializing your AFURLSessionManager/Manager with the above (NS)URLSessionConfiguration:

// Objective-C (AFNetworking)

AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];
// Swift (Alamofire)

let manager = Alamofire.SessionManager(configuration: configuration)

And that's all!

Step 2: Profit

Now it's time to perform the actual request:

// Objective-C

NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://httpbin.org/get"]];
[[session dataTaskWithRequest:request] resume];
// Swift

let request = URLRequest(URL: URL(string: "http://httpbin.org/get")!)
session.dataTask(with: request).resume()

VoilΓ ! πŸŽ‰ Check out your console output:

<0x000000000badf00d> [REQUEST] GET https://httpbin.org/get
 β”œβ”€ Headers
 β”œβ”€ Body
 β”‚ <none>

<0x000000000badf00d> [RESPONSE] 200 (NO ERROR) https://httpbin.org/get
 β”œβ”€ Headers
 β”‚ Server: nginx
 β”‚ Date: Thu, 01 Jan 1970 00:00:00 GMT
 β”‚ Content-Type: application/json
 β”œβ”€ Body
 β”‚ {
 β”‚   "args" : {
 β”‚   },
 β”‚   "headers" : {
 β”‚     "User-Agent" : "ResponseDetective\/1 CFNetwork\/758.3.15 Darwin\/15.4.0",
 β”‚     "Accept-Encoding" : "gzip, deflate",
 β”‚     "Host" : "httpbin.org",
 β”‚     "Accept-Language" : "en-us",
 β”‚     "Accept" : "*\/*"
 β”‚   },
 β”‚   "url" : "https:\/\/httpbin.org\/get"
 β”‚ }

Installation

Carthage

If you're using Carthage, add the following dependency to your Cartfile:

github "netguru/ResponseDetective" ~> {version}

CocoaPods

If you're using CocoaPods, add the following dependency to your Podfile:

use_frameworks!
pod 'ResponseDetective', '~> {version}'

Local

To install the test dependencies or to build ResponseDetective itself, do not run carthage directly. It can't handle the Apple Silicon architectures introduced in Xcode 12. Instead, run it through the carthage.sh script:

$ ./carthage.sh bootstrap

About

This project was made with β™‘ by Netguru.

Release names

Starting from version 1.0.0, ResponseDetective's releases are named after Sherlock Holmes canon stories, in chronological order. What happens if we reach 60 releases and there are no more stories? We don't know, maybe we'll start naming them after cats or something.

License

This project is licensed under MIT License. See LICENSE.md for more info.

Comments
  • Could not build module 'ResponseDetective'

    Could not build module 'ResponseDetective'

    In line @import ResponseDetective; I am getting following compile time error in Obj-C for branch feature/swift-3-dev Could not build module 'ResponseDetective'

    opened by SandeepAggarwal 17
  • The β€œSwift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.

    The β€œSwift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.

    I'm using ResponseDetective (1.2.0) in xcode 9.0.1 using Objective C. Xcode even gave me "Use of undeclared identifier 'RDTResponseDetective'".

    opened by adamhongmy 12
  •  a shell task failed with exit code 65

    a shell task failed with exit code 65

    While installing this as a framework using Carthage I am getting following error:

    a shell task failed with exit code 65

    You may find a similar issue which occurred with Charts library here: https://github.com/danielgindi/Charts/issues/1476

    opened by SandeepAggarwal 11
  • All requests made with Alamofire manager cancelled after adding InterceptingProtocol

    All requests made with Alamofire manager cancelled after adding InterceptingProtocol

    After I've added ResponseDetective to my project and assigned InterceptingProtocol to protocol classes of configuration used to create Alamofire manager

    configuration.protocolClasses = [InterceptingProtocol.self]
    manager = Alamofire.Manager(configuration: configuration)
    

    all my requests are canceled.

    ResponseDetective prints requests and responses correctly, but Alamofire manager response callback is always called with the following error:

    Optional(Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo=0x7f9683068010 {NSErrorFailingURLKey=http://private-c73ea-roommatev2.apiary-mock.com/sessions, NSLocalizedDescription=cancelled, NSErrorFailingURLStringKey=http://private-c73ea-roommatev2.apiary-mock.com/sessions})
    
    opened by mateuszbuda 9
  • Does not work with HTTPS protocol

    Does not work with HTTPS protocol

    I tried to send request with URL https://httpbin.org/xml and it seems that communication is broken. No response is delivered until timeout.

    I have only this one interceptor:

    InterceptingProtocol.registerResponseInterceptor(XMLInterceptor())
    
    opened by tomassliz 9
  • Add Swift Package Manager support

    Add Swift Package Manager support

    This PR adds support for Swift Package manager to this repository.

    The same versions of iOS, macOS, and tvOS are supported as before, and the project structure was not changed. This means that the Carthage and CocoaPods versions of this framework still work.

    I had to make 2 small changes in ResponseDetectiveSpec.swift:

    1. Ensure buffer is initialized newly in the beforeEach block. Otherwise, running tests in a random order can fail
    2. I replaced stub(condition: isHost... with HTTPStubs.stubRequests; it's possible I configured something incorrectly, but my Swift compiler was unable to find that method.

    Please let me know what you think!

    opened by mattboran 7
  • Crashing on iOS 10.3.1

    Crashing on iOS 10.3.1

    The app is crashing without any message on iOS 10.3.1. Upon rebuilding the 'ResponseDetective' using Carthage update --platform ios it is giving following error:

    :0: warning: argument unused during compilation: '-iapinotes-modules /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/arm64

    opened by SandeepAggarwal 6
  • Can't import ResponseDetective

    Can't import ResponseDetective

    I tried playing around with your library, I installed it with cocoapods I couldn't import it, tried your playground got No such module... error, tried it on another machine same thing. my xcode version 8.0, second machine xcode version 8.2

    opened by yousefhamza 5
  • Issue when using ResponseDetective with Carthage

    Issue when using ResponseDetective with Carthage

    Hello! We are having this issue since yesterday when trying to use the project through Carthage:

    A shell task (/usr/bin/env git clone --bare --quiet https://github.com/netguru/xcconfigs.git /Users/adrian/Library/Caches/org.carthage.CarthageKit/dependencies/xcconfigs) failed with exit code 128:
    fatal: could not read Username for 'https://github.com': terminal prompts disabled
    

    Any chance that the access rights for the repo https://github.com/netguru/xcconfigs.git changed?

    opened by adrianbukros 4
  • Carthage *** Skipped installing ResponseDetective.framework binary due to the error:

    Carthage *** Skipped installing ResponseDetective.framework binary due to the error:

    screen shot 2018-04-03 at 11 40 53 am

    *** Skipped installing ResponseDetective.framework binary due to the error: "Incompatible Swift version - framework was built with 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2) and the local version is 4.1 (swiftlang-902.0.48 clang-902.0.37.1)."

    I googled this similar issue seems other libraries such as this did complain about this too and it is related to Xcode 9.3 and Swift 4.1.

    opened by adamhongmy 4
  • Error while building the project

    Error while building the project

    ld: /Users/user_name/Library/Developer/Xcode/DerivedData/Project_Name-gblnftdcyqwoicfexphoypuxrrfl/Build/Products/Debug-iphonesimulator/ResponseDetective/ResponseDetective.framework/ResponseDetective compiled with older version of Swift language (2.0) than previous files (3.0) for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    XCode 8 Beta 3

    I've enabled the "Use Legacy Swift Version" to 'yes' but still getting this error.

    opened by khurramengr 4
  • Some Requests are getting cancelled when Response Detective is enabled

    Some Requests are getting cancelled when Response Detective is enabled

    I am using a POST network call which does get cancelled for some unknown reason.

    When i am not enabling responseDetective, i do get a response with code 200.

    I am using pure URLSession. Not using any external libraries for the request.

    When responseDetective is active the request is getting cancelled and on console log i do see:

     [Info] (NetworkLogger, output(requestRepresentation:), 23): [Network] Request id EFF99D2A-7E69-414D-B6C9-9C1D993D4BAD (POST) api/v0/somePath/other
     API MISUSE: NSURLSession delegate RDTURLProtocol: <RDTURLProtocol: 0x6000019f2c10> (0x6000019f2c10)
     API MISUSE: task:willPerformHTTPRedirection:newRequest:completionHandler: completion handler not called
     [Error] (NetworkLogger, output(errorRepresentation:), 47): [Network] Error id EFF99D2A-7E69-414D-B6C9-9C1D993D4BAD domain: NSURLErrorDomain code: -999 reason: cancelado
    [Info] (NetworkLogger, output(requestRepresentation:), 23): [Network] Request id 82292D2C-05B7-4950-AC17-9B88516ABA1F (POST) api/v0/somePath/other/xxxxx
    
    
    opened by ran-helfer 2
  • Proposal for a fix for the Xcode 13.3 - Trace/BPT trap:5

    Proposal for a fix for the Xcode 13.3 - Trace/BPT trap:5

    This PR is a proposal to fix Issue https://github.com/netguru/ResponseDetective/issues/65

    Please be aware that haven't been following the history of this framework, for that I'm not entirely aware of the impact these changes will have for everyone that depends on it. I tested the fix on our codebase, we're importing the framework using Carthage, the fix was tested on an M1 machine.

    All tests for all platforms passed are βœ…

    Changes:

    • uses a standard block (instead of convention(block) for printClosure in ConsoleOutputFacility.swift
    • user a standard block (instead of convention(block) for deserializationClosure in TestBodyDeserializer.swift
    • through to problems on M1, used Swift Packages (instead of Carthage) for private 3rd party dependencies in the test targets

    Please let me hear your thoughts

    opened by mschuetz-viz 0
  • Trace/BPT trap:5 error since XCode 13.3

    Trace/BPT trap:5 error since XCode 13.3

    Hello, since updating XCode to 13.3 I have the following Trace/BPT trap: 5 error during build. I am using cocoapods. Has someone some ideas about how to get around this ?

    CompileSwift normal x86_64 (in target 'ResponseDetective' from project 'Pods')
        cd /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/BufferOutputFacility.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ConsoleOutputFacility.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/Dictionary.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ErrorRepresentation.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ImageBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/JSONBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/OutputFacility.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/PlaintextBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/RequestRepresentation.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ResponseDetective.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ResponseRepresentation.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/URLEncodedBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/URLProtocol.swift -supplementary-output-file-map /var/folders/fq/s0bj6lr95t5_lvx66lqyv0cw0000gn/T/TemporaryDirectory.JREny4/supplementaryOutputs-1 -target x86_64-apple-ios8.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk -I /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Products/Debug-dev-iphonesimulator/ResponseDetective -F /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Products/Debug-dev-iphonesimulator/ResponseDetective -suppress-warnings -g -import-underlying-module -module-cache-path /Users/williamsantos/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -profile-generate -profile-coverage-mapping -swift-version 5 -enforce-exclusivity\=checked -O -D COCOAPODS -new-driver-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver -serialize-debugging-options -Xcc -working-directory -Xcc /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-generated-files.hmap -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-own-target-headers.hmap -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-project-headers.hmap -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Products/Debug-dev-iphonesimulator/ResponseDetective/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk/usr/include/libxml2 -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/DerivedSources-normal/x86_64 -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/DerivedSources/x86_64 -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG_DEV\=1 -Xcc -DCOCOAPODS\=1 -Xcc -ivfsoverlay -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/unextended-module-overlay.yaml -module-name ResponseDetective -target-sdk-version 15.4 -num-threads 8 -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/BufferOutputFacility.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ConsoleOutputFacility.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/Dictionary.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ErrorRepresentation.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ImageBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/JSONBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/OutputFacility.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/PlaintextBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/RequestRepresentation.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ResponseDetective.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ResponseRepresentation.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/URLEncodedBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/URLProtocol.o
    
    [cleanup]   %17 = apply %15(%16) : $@convention(method) (@guaranteed String) -> @owned NSString
    Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
    Stack dump:
    0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/BufferOutputFacility.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ConsoleOutputFacility.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/Dictionary.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ErrorRepresentation.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ImageBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/JSONBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/OutputFacility.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/PlaintextBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/RequestRepresentation.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ResponseDetective.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ResponseRepresentation.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/URLEncodedBodyDeserializer.swift /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/URLProtocol.swift -supplementary-output-file-map /var/folders/fq/s0bj6lr95t5_lvx66lqyv0cw0000gn/T/TemporaryDirectory.JREny4/supplementaryOutputs-1 -target x86_64-apple-ios8.0-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk -I /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Products/Debug-dev-iphonesimulator/ResponseDetective -F /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Products/Debug-dev-iphonesimulator/ResponseDetective -suppress-warnings -g -import-underlying-module -module-cache-path /Users/williamsantos/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -profile-generate -profile-coverage-mapping -swift-version 5 -enforce-exclusivity=checked -O -D COCOAPODS -new-driver-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver -serialize-debugging-options -Xcc -working-directory -Xcc /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-generated-files.hmap -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-own-target-headers.hmap -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/ResponseDetective-project-headers.hmap -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Products/Debug-dev-iphonesimulator/ResponseDetective/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk/usr/include/libxml2 -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/DerivedSources-normal/x86_64 -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/DerivedSources/x86_64 -Xcc -I/Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG_DEV=1 -Xcc -DCOCOAPODS=1 -Xcc -ivfsoverlay -Xcc /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/unextended-module-overlay.yaml -module-name ResponseDetective -target-sdk-version 15.4 -num-threads 8 -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/BufferOutputFacility.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ConsoleOutputFacility.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/Dictionary.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ErrorRepresentation.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ImageBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/JSONBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/OutputFacility.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/PlaintextBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/RequestRepresentation.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ResponseDetective.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/ResponseRepresentation.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/URLEncodedBodyDeserializer.o -o /Users/williamsantos/Library/Developer/Xcode/DerivedData/rgplayers-diegoaqfaikdhufogwsifirnsral/Build/Intermediates.noindex/Pods.build/Debug-dev-iphonesimulator/ResponseDetective.build/Objects-normal/x86_64/URLProtocol.o
    1.	Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
    2.	Compiling with the current language version
    3.	While evaluating request ASTLoweringRequest(Lowering AST to SIL for module ResponseDetective)
    4.	While silgen emitFunction SIL function "@$s17ResponseDetective21ConsoleOutputFacilityC14printBoxString33_174F18FF5D8597AF4BD2C57144D28C7ELL5title8sectionsySS_SaySS_SaySSGtGtF".
     for 'printBoxString(title:sections:)' (at /Users/williamsantos/Documents/workspace_ios/app-players-ios/Pods/ResponseDetective/ResponseDetective/Sources/ConsoleOutputFacility.swift:141:10)
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
    0  swift-frontend           0x0000000106da6f88 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
    1  swift-frontend           0x0000000106da5f9c llvm::sys::RunSignalHandlers() + 112
    2  swift-frontend           0x0000000106da7618 SignalHandler(int) + 344
    3  libsystem_platform.dylib 0x00000001931144e4 _sigtramp + 56
    4  swift-frontend           0x0000000102d45264 (anonymous namespace)::Transform::transform(swift::Lowering::ManagedValue, swift::Lowering::AbstractionPattern, swift::CanType, swift::Lowering::AbstractionPattern, swift::CanType, swift::SILType, swift::Lowering::SGFContext) + 10344
    5  swift-frontend           0x0000000102cb213c emitNativeToCBridgedValue(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::CanType, swift::CanType, swift::SILType, swift::Lowering::SGFContext) + 6260
    6  swift-frontend           0x0000000102cd73e0 swift::Lowering::Conversion::emit(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, swift::Lowering::SGFContext) const + 760
    7  swift-frontend           0x0000000102cd800c swift::Lowering::ConvertingInitialization::copyOrInitValueInto(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::ManagedValue, bool) + 132
    8  swift-frontend           0x0000000102c7af40 (anonymous namespace)::ScalarResultPlan::finish(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::CanType, llvm::ArrayRef<swift::Lowering::ManagedValue>&, swift::SILValue) + 460
    9  swift-frontend           0x0000000102c91d88 swift::Lowering::SILGenFunction::emitApply(std::__1::unique_ptr<swift::Lowering::ResultPlan, std::__1::default_delete<swift::Lowering::ResultPlan> >&&, swift::Lowering::ArgumentScope&&, swift::SILLocation, swift::Lowering::ManagedValue, swift::SubstitutionMap, llvm::ArrayRef<swift::Lowering::ManagedValue>, swift::Lowering::CalleeTypeInfo const&, swift::OptionSet<swift::ApplyFlags, unsigned char>, swift::Lowering::SGFContext, llvm::Optional<swift::ImplicitActorHopTarget>) + 2160
    10 swift-frontend           0x0000000102c982fc (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 2464
    11 swift-frontend           0x0000000102c95dc0 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2160
    12 swift-frontend           0x0000000102cefc88 swift::Lowering::SILGenFunction::emitRValueAsSingleValue(swift::Expr*, swift::Lowering::SGFContext) + 40
    13 swift-frontend           0x0000000102cd6ff0 swift::Lowering::SILGenFunction::emitConvertedRValue(swift::SILLocation, swift::Lowering::Conversion const&, swift::Lowering::SGFContext, llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::SGFContext)>) + 312
    14 swift-frontend           0x0000000102ca4ff0 (anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 3080
    15 swift-frontend           0x0000000102c9360c (anonymous namespace)::ArgEmitter::emitSingleArg(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern) + 200
    16 swift-frontend           0x0000000102cad348 (anonymous namespace)::CallSite::emit(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::SILFunctionType>, (anonymous namespace)::ParamLowering&, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, swift::ForeignInfo const&) && + 524
    17 swift-frontend           0x0000000102cace94 (anonymous namespace)::CallEmission::emitArgumentsForNormalApply(swift::Lowering::AbstractionPattern, swift::CanTypeWrapper<swift::SILFunctionType>, swift::ForeignInfo const&, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::Optional<swift::SILLocation>&) + 932
    18 swift-frontend           0x0000000102c9823c (anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) + 2272
    19 swift-frontend           0x0000000102c95dc0 swift::Lowering::SILGenFunction::emitApplyExpr(swift::ApplyExpr*, swift::Lowering::SGFContext) + 2160
    20 swift-frontend           0x0000000102ceff94 swift::Lowering::SILGenFunction::emitIgnoredExpr(swift::Expr*) + 624
    21 swift-frontend           0x0000000102d5805c swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) + 3676
    22 swift-frontend           0x0000000102d125e0 swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 704
    23 swift-frontend           0x0000000102c86940 swift::Lowering::SILGenModule::emitFunctionDefinition(swift::SILDeclRef, swift::SILFunction*) + 10084
    24 swift-frontend           0x0000000102c88be8 emitOrDelayFunction(swift::Lowering::SILGenModule&, swift::SILDeclRef, bool) + 228
    25 swift-frontend           0x0000000102c841c8 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 228
    26 swift-frontend           0x0000000102d666ac (anonymous namespace)::SILGenType::emitType() + 296
    27 swift-frontend           0x0000000102c8c99c swift::ASTVisitor<swift::Lowering::SILGenModule, void, void, void, void, void, void>::visit(swift::Decl*) + 104
    28 swift-frontend           0x0000000102c8b3e4 swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const + 3396
    29 swift-frontend           0x0000000102d56e74 swift::SimpleRequest<swift::ASTLoweringRequest, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> > (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::ASTLoweringRequest const&, swift::Evaluator&) + 216
    30 swift-frontend           0x0000000102c8e8c8 llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::getResultUncached<swift::ASTLoweringRequest>(swift::ASTLoweringRequest const&) + 608
    31 swift-frontend           0x0000000102648d8c swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6700
    32 swift-frontend           0x0000000102610130 swift::mainEntry(int, char const**) + 808
    33 dyld                     0x00000001096210f4 start + 520
    error: Trace/BPT trap: 5 (in target 'ResponseDetective' from project 'Pods')
    
    opened by ghost 2
  • Add response filtering method.

    Add response filtering method.

    Currently there is a method available to filter logged requests: ignoreRequests(matchingPredicate predicate: NSPredicate)

    The goal here is to create a method with the same idea to filter responses that are logged into console.

    Motivation - I've integrated the library into the app and instantly deintegrated it due to amount of logged stuff that became totally unreadable. Single logs are really useful and readable, but I want to filter only responses that failed for some reason to investigate possible bugs.

    opened by poszposz 1
  • Hide Objective-C nature of XML and HTML body deserializers

    Hide Objective-C nature of XML and HTML body deserializers

    As libxml cannot be imported to Swift directly, ResponseDetective currently uses RDTBodyDeserializer, RDTXMLBodyDeserializer and RDTHTMLBodyDeserializer types, thus making its unwanted Objective-C nature public.

    Ideally, I'd like to remove all traces of Objective-C files from the project. This could be achieved in a couple of ways:

    1. Use an Objective-C libxml wrapper as an external framework and import it directly in Swift. This is the worst solution because it adds an unwanted third-party dependency to ResponseDetective.

    2. Create a project-private libxml wrapper as a separate framework and import it directly in Swift. This is better than the 1st solution, but adds a lot of unwanted complexity, especially with header search paths, linking and module maps.

    3. Use a project-private module (not to be mistaken with framework) that exposes needed libxml functionalities internally to ResponseDetective, but no further. This is the best solution.

    Assuming the 3rd solution is chosen, the proposed implementation would consist of the following files:

    • A .m file that uses libxml and contains implementation of XML and HTML pretty-printing,
    • A non-public .h file that contains interface of above implementation,
    • A .modulemap file that defines a module including the above header.

    As a result, ResponseDetective could import XMLPrettyPrinting (exemplary name of module) directly and use refined-for-Swift APIs without them leaking to the outside world.

    opened by akashivskyy 1
  • Improve printing of empty, unrecognizable and non-raw bodies

    Improve printing of empty, unrecognizable and non-raw bodies

    Currently ResponseDetective prints <none> for bodies in the following situations:

    1. when the body is empty, i.e. has 0 bytes;
    2. and when the body cannot be deserialized, i.e. has an unsupported content-type.

    The 2nd situation might be confusing as <none> might suggest that a request has an empty body.

    The proposal is to improve handling of empty and non-deserializable bodies in the following way:

    1. for empty bodies β†’ print <empty>;
    2. for non-deserializable bodies β†’ print <unrecognizable x bytes>.

    In addition, other non-raw bodies, such as 1px Γ— 1px image for image/* content-type, should also be wrapped in triangular brackets (i.e. <1px Γ— 1px image>) so that it can be distinguished from plain text bodies with similar contents.

    opened by akashivskyy 0
Releases(1.5.1)
  • 1.5.1(Dec 21, 2021)

  • 1.5.0(Dec 2, 2020)

    In this release:

    • The configuration files which were pulled from netguru/xcconfigs are now vendored. (#63, @akashivskyy)
    • Modernized the project for Xcode 12.2 and Swift 5.3. (#63, @akashivskyy)
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Mar 26, 2020)

    In this release:

    • Fixed a crash caused by obtaining pointer address of URLSession. (#59, @akashivskyy)
    • Modernized the project for Xcode 11.4 and Swift 5.2. (#59, @akashivskyy)

    Note: The prebuilt framework is not going to be distributed from this release forward.

    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Apr 2, 2019)

  • 1.2.4(Apr 6, 2018)

  • 1.2.3(Feb 2, 2018)

  • 1.2.2(Nov 3, 2017)

  • 1.2.1(Oct 23, 2017)

  • 1.2.0(Oct 1, 2017)

    In this release:

    • Modernized the project to Xcode 9 and Swift 3.2 (#41, #45, @akashivskyy)
    • Migrated underlying project configuration to netguru/xcconfigs (#33, #37, @akashivskyy)
    • Fixed a documentation mistake (#44, @castus)

    Zero source changes have been made. Kudos to @Siemian who helped review the pull requests!

    Note: The prebuilt framework targets Swift 3.2 and Xcode 9.0.

    Source code(tar.gz)
    Source code(zip)
    ResponseDetective.framework.zip(4.80 MB)
  • 1.1(May 4, 2017)

    In this release:

    • */x-www-form-urlencoded content-types are now deserialized (#31, #32, kudos to @akashivskyy!)
    • text/* (not only text/plain) content-types are now deserialized (#32, kudos to @akashivskyy!)

    Kudos to @pikor who helped review the pull requests!

    Note: The prebuilt framework targets Swift 3.1 and Xcode 8.3.

    Source code(tar.gz)
    Source code(zip)
    ResponseDetective.framework.zip(5.68 MB)
  • 1.0.1(Mar 28, 2017)

  • 1.0(Feb 24, 2017)

    This is a major and a first stable release of ResponseDetective! πŸ•΅οΈ

    • Swift 3.0.2 support: ResponseDetective has been rewritten in Swift 3.0.2 and its API has been revisited to be compliant with Swift API Design Guidelines. (#13, #19, #22, #25, #27, #18, #20, kudos to @serejahh and @akashivskyy!)
    • Platform support: ResponseDetective now supports tvOS 9.0+ and macOS requirement has been lowered to macOS 10.9+. (#16, #17, kudos to @akashivskyy!)
    • Better CocoaPods support: Installation issues that might have occurred when using CocoaPods on Objective-C-only projects has been fixed. (#21, #28, kudos to @MatteoBatti and @akashivskyy!)
    • Parametric Content-Types: ResponseDetective now honors Content-Type headers containing parameters, such as application/json; charset=utf8. (#23, #24, #26, kudos to @akashivskyy!)

    Kudos to @PatrykKaczmarek, @rad3ks, @Siemian and @akashivskyy who helped review the pull requests!

    Note: The prebuilt framework targets Swift 3.0.2 and Xcode 8.2.1. If you use another version of Xcode, you might need to run carthage command with --no-use-binaries option.

    Source code(tar.gz)
    Source code(zip)
    ResponseDetective.framework.zip(5.21 MB)
  • 0.5(Oct 3, 2016)

  • 0.4(May 23, 2016)

    This is a major new release with lots of new features, bug fixes, improvements and backward-incompatible breaking changes. The major new features include:

    • Less boilerplate, more flexibility – You no longer need to either specify request, response and error interceptors, or manually register the intercepting protocol for every instance of NSURLSession. Now all you need to do is to call one shortcut method to enable ResponseDetective and start logging HTTP traffic.

    • Objective-C interoperability – You can now use ResponseDetective from your legacy :trollface: Objective-C apps, without needing to create mix-and-match bridges with Swift!

    • Request filtering – Not all requests (e.g. such including sensitive data) should be printed into the console even for debug purposes. Now you can use multiple NSPredicates to filter out NSURLRequests which should not be intercepted by ResponseDetective.

    • Better console output – The console outputs became much more readable. The new format uses a boxed layout and includes a request identifier (0xbadf00d in this particular example) so that you can quickly associate responses with originating requests.

      <0xbadf00d> [RESPONSE] 200 (NO ERROR) https://httpbin.org/post
       β”œβ”€ Headers
       β”‚ Content-Type: application/json
       β”‚ Content-Length: 24
       β”œβ”€ Body
       β”‚ {
       β”‚   "args": {},
       β”‚   "headers": {}
       β”‚ }
      

    In addition to the above major features, this version includes the following fixes and improvements:

    • Source code is now written in Swift 2.2 and will be regularly updated as new language versions are released.
    • InterceptingProtocol has been renamed to URLProtocol. It is no longer a part of public API and it's no longer responsible for anything more than just HTTP interception.
    • Request and response interceptor types have been removed and their body prettification mechanism has been decomposed into BodyDeserializer protocol.
    • ResponseDetective no longer uses Swift's OutputStreamType for identifying possible output targets. A new OutputFacility protocol has been introduced – it now allows output facilities to handle raw request, response and error representations instead of meaningless strings.
    • Error interceptors have been removed and errors are now intercepted by default as part of standard URLProtocol functionality.
    • Header interceptors have been removed as well and they are now printed by default, no matter which body deserializer is used.
    • Standard request and response body deserializers (*/json, '*/xml, */html, text/plain, image/*) are now enabled by default and cannot be unregistered.
    • RequestRepresentation, ResponseRepresentation and ErrorRepresentation types have all gone through major implementation cleanup and now in addition to their represented type, they contain associated deserialized body and request identifier.
    • Build settings and configurations have been migrated from pbxproj into dedicated xcconfig files and Info.plists have been updated to use build settings instead of hardcoded values.
    • Project has been migrated to Bitrise.io Continuous Integration service.

    Also, the following issues have been resolved:

    • Requests made using Alamofire.Manager are automatically cancelled and ignored (#5)

    Note: The prebuilt framework targets Swift 2.2 and Xcode 7.3. If you're use another version of Xcode, you might need to run carthage command with --no-use-binaries option.

    Source code(tar.gz)
    Source code(zip)
    ResponseDetective.framework.zip(27.11 MB)
  • 0.3(Sep 21, 2015)

  • 0.2(Jul 27, 2015)

  • 0.1(Jul 20, 2015)

  • 0.1-rc2(Jul 19, 2015)

    In this release candidate:

    • Added OS X support.
    • Made *InterceptorType protocols : class protocols.
    • InterceptingProtocol doesn't use removal tokens anymore.
    • Added ImageInterceptor for intercepting image/* responses.
    • Renamed BaseInterceptor to HeadersInterceptor to clarify its purpose.
    • Fixed a bug with request timeout when using completion handlers.
    • Fixed a bug with content-type not being recognized.
    • Added missing specs, thus completing the coverage.
    • Made various README improvements.
    Source code(tar.gz)
    Source code(zip)
    ResponseDetective.framework.zip(3.95 MB)
  • 0.1-rc1(Jul 8, 2015)

Owner
Netguru
Building software for world changers
Netguru
Advanced Networking Layer Using Alamofire with Unit Testing

Advanced Networking Layer Using Alamofire with Unit Testing

Ali Fayed 8 May 23, 2022
An elegant yet powerful iOS networking layer inspired by ActiveRecord.

Written in Swift 5 AlamoRecord is a powerful yet simple framework that eliminates the often complex networking layer that exists between your networki

Tunespeak 19 Nov 19, 2022
GXBaseAPI - GARPIX Networking Layer

GXBaseAPI GARPIX Networking Layer URLSession + Combine + Codable + Generics ВсС

GARPIX iOS team 2 Jan 21, 2022
πŸ€΅πŸ½β€β™€οΈ Janet β€” A thin HTTP networking layer built on URLSession for simple, declarative endpoint specification leveraging the power of async/await.

????‍♀️ Janet β€” Just another networking kit β€” A thin HTTP networking layer built on URLSession for simple, declarative endpoint specification leveragi

Niklas Holloh 3 Sep 6, 2022
Dratini is a neat network abstraction layer.

Dratini Dratini is a neat network abstraction layer. If you are looking for a solution to make your network layer neat, Dratini is your choice. Dratin

Kevin Lin 37 Jan 29, 2022
Network abstraction layer written in Swift.

Moya 14.0.0 A Chinese version of this document can be found here. You're a smart developer. You probably use Alamofire to abstract away access to URLS

Moya 14.4k Jan 1, 2023
Elegant network abstraction layer in Swift.

Elegant network abstraction layer in Swift. δΈ­ζ–‡ Design Features Requirements Communication Installation Usage Base Usage - Target - Request - Download

null 100 Dec 9, 2022
Lightweight network abstraction layer, written on top of Alamofire

TRON is a lightweight network abstraction layer, built on top of Alamofire. It can be used to dramatically simplify interacting with RESTful JSON web-

MLSDev 528 Dec 26, 2022
A generic network layer written in swift

SwiftyNet 1.0.0 A generic network layer written in swift. you can use it as an abstraction layer above Alamofire with generic returned types. Installa

Mohamed Salah Zidane 17 Oct 11, 2021
πŸ”Œ Non-blocking TCP socket layer, with event-driven server and client.

Original authors Honza Dvorsky - http://honzadvorsky.com, @czechboy0 Matthias Kreileder - @matthiaskr1 At the request of the original authors, we ask

Vapor Community 574 Dec 7, 2022
Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application.

Another network wrapper for URLSession. Built to be simple, small and easy to create tests at the network layer of your application. Install Carthage

Ronan Rodrigo Nunes 89 Dec 26, 2022
Generic Network Layer created using Swift.

Generic-Network-Layer_iOS Generic Network Layer created using URLSession. Networking is an essential element in app development, and you'll need API c

Shubham Kr. Singh 41 Dec 31, 2022
NSURLSession network abstraction layer, using Codable and Decodable for response and Encodable for request. βš™οΈπŸš€

SONetworking NSURLSession network abstraction layer, using Codable and Decodable for response and Encodable for request. Project Folder and File Struc

Ahmad AlSofi 4 Jan 28, 2022
Alamofire network layer

NVNetworkRequest Alamofire network layer Installation Add this to your Package dependencies: dependencies: [ .package(url: "https://github.com/vin

Vinh Nguyen 0 Nov 19, 2021
Say goodbye to the Fat ugly singleton Network Manager with this Network Layer

MHNetwork Protocol Oriented Network Layer Aim to avoid having bloated singleton NetworkManager Philosophy the main philosophy behind MHNetwork is to h

Mohamed Emad Hegab 19 Nov 19, 2022
Network abstraction layer written in Swift.

Moya 15.0.0 A Chinese version of this document can be found here. You're a smart developer. You probably use Alamofire to abstract away access to URLS

Moya 14.4k Jan 4, 2023
Async network layer with Combine

Version 1.0.10 Currently Available Platform Version iOS 12.0 tvOS 10.0 macOS 10.15 watchOS 3.0 macCatalyst 13.0 Hover is a Network layer which uses Ap

Onur HΓΌseyin Γ‡antay 124 Oct 23, 2022
Approov-service-ios-swift-grpc - Approov service layer for iOS clients using GRPC

Approov Service for GRPC A wrapper for the Approov SDK to enable easy integratio

Approov Integration Examples 0 Jan 21, 2022
Http - Demo for Http Layer

http Example To run the example project, clone the repo, and run pod install fro

null 0 Jan 24, 2022