Skip to content

Commit

Permalink
Update demo to use the interceptor's new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lincode committed Oct 24, 2016
1 parent 5e706b9 commit ec2db10
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions RexxarDemo/FullRXRViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class FullRXRViewController: RXRViewController {
let geoContainerAPI = RXRGeoContainerAPI()
let logContainerAPI = RXRLogContainerAPI()
RXRContainerInterceptor.setContainerAPIs([geoContainerAPI, logContainerAPI])
//URLProtocol.registerClass(RXRContainerInterceptor.self)
let _ = RXRContainerInterceptor.register()

// Decorators
Expand All @@ -36,12 +35,11 @@ class FullRXRViewController: RXRViewController {
let requestDecorator = RXRRequestDecorator(headers: headers, parameters: parameters)
RXRRequestInterceptor.setDecorators([requestDecorator])
URLProtocol.registerClass(RXRRequestInterceptor.self)
let _ = RXRRequestInterceptor.register()
}

deinit {
//URLProtocol.unregisterClass(RXRContainerInterceptor.self)
RXRContainerInterceptor.unregisterInterceptor()

URLProtocol.unregisterClass(RXRRequestInterceptor.self)
RXRRequestInterceptor.unregisterInterceptor()
}
}

0 comments on commit ec2db10

Please sign in to comment.