capitalone / SWHttpTrafficRecorder

A simple library empowering you to record/capture HTTP(s) traffic of an iOS app for mocking/stubbing later.
Apache License 2.0
205 stars 48 forks source link

Add option to record AFNetworking #7

Open Ashton-W opened 8 years ago

Ashton-W commented 8 years ago

AFNetworking posts notifications as request operations and session tasks are started and finish. We could add an option to setup the recorder to listen to all AFNetworking activity, without dealing with the underlying NSURLSession objects.

See: https://github.com/AFNetworking/AFNetworkActivityLogger

johndpope commented 7 years ago

Hi Ashton,

There is this AFNetworking library that records to HTTP Archive format. https://github.com/mutualmobile/AFHARchiver

Seems like a bit of an oversight none of these libraries use this format to save data https://gist.github.com/jjarava/5f26806bba75d052c41a

I opened this ticket for OHHTTPStubs to add support to this https://github.com/AliSoftware/OHHTTPStubs/issues/204 This library could also consider support this format.

And threw up this code to help assist this. https://github.com/johndpope/har-reader