<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          ResponseDetective非侵入式框架

          聯(lián)合創(chuàng)作 · 2023-09-27 09:21

          ResponseDetective 是一個(gè)非侵入式框架,用于攔截你的應(yīng)用程序和服務(wù)器之間的傳出請(qǐng)求和傳入的反應(yīng),可用于調(diào)試。

          使用:

          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()
          瀏覽 22
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  人人操人人摸人人射 | 欧美美女操B视频 | 黄在线免费观看视频 | 国产内射在线视频 | 国产靠逼视频 |