非侵入式框架 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()
Python高效开发实战——Django、Tornado、Flask、Twisted(第2版)
刘长龙 / 电子工业出版社 / 2019-1 / 99
也许你听说过全栈工程师,他们善于设计系统架构,精通数据库建模、通用网络协议、后端并发处理、前端界面设计,在学术研究或工程项目上能独当一面。通过对Python 3及相关Web框架的学习和实践,你就可以成为这样的全能型人才。 《Python高效开发实战——Django、Tornado、Flask、Twisted(第2版)》分为3篇:上篇是Python基础,带领初学者实践Python开发环境,掌握......一起来看看 《Python高效开发实战——Django、Tornado、Flask、Twisted(第2版)》 这本书的介绍吧!
