非侵入式框架 ResponseDetective
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/netguru/ResponseDetective
软件介绍
ResponseDetective 是一个非侵入式框架,用于拦截你的应用程序和服务器之间的传出请求和传入的反应,可用于调试。
使用:
Step 1: Register interceptors
// request InterceptingProtocol.registerRequestInterceptor(BaseInterceptor()) InterceptingProtocol.registerRequestInterceptor(JSONInterceptor()) // response InterceptingProtocol.registerResponseInterceptor(BaseInterceptor()) InterceptingProtocol.registerResponseInterceptor(JSONInterceptor()) InterceptingProtocol.registerResponseInterceptor(HTMLInterceptor()) // error InterceptingProtocol.registerErrorInterceptor(BaseInterceptor())
Step 2: Register the protocol
let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() configuration.protocolClasses = [InterceptingProtocol.self] let session = NSURLSession(configuration: configuration)
let configuration = NSURLSessionConfiguration.defaultSessionConfiguration() configuration.protocolClasses = [InterceptingProtocol.self] let manager = Alamofire.Manager(configuration: configuration)
Step 3: Profit
let request = NSURLRequest(URL: NSURL(string: "http://httpbin.org/get")!) let task = session.dataTaskWithRequest(request) task.resume()
Docker——容器与容器云
浙江大学SEL实验室 / 人民邮电出版社 / 2015-9-1 / 89.00元
本书从实践者的角度,在讲解Docker高级实践技巧的同时,深入到源代码层次,为读者梳理出Docker容器技术和基于Docker的容器云技术(如Kubernetes)的实现方法和设计思路,帮助读者理解如何在实际场景中利用Docker解决问题并启发新的思考。全书包括两部分,第一部分深入解读Docker容器技术,包括Docker入门、架构总览、Docker容器核心原理解读,以及Docker高级实践技巧;......一起来看看 《Docker——容器与容器云》 这本书的介绍吧!
