<commit_before>#### Alamofire workaround

Due to the way Alamofire uses NSURLSession, you’ll need to do a little more than the standard installation to monitor all requests. The simplest way to do this is to create a subclass of Manager to handle your requests as this

<pre>
import Alamofire

class NFXManager: Alamofire.Manager
{
    static let sharedManager: NFXManager = {
        let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
        configuration.protocolClasses?.insert(NFXProtocol.self, atIndex: 0)
        let manager = NFXManager(configuration: configuration)
        return manager
    }()
}
</pre>

Then just use NFXManager.sharedManager instead of Alamofire.request()

#### No HTTP body for requests

Unfortunately, due to a limitation in NSURLProtocol, netfox is unable to log the HTTP body of some requests (check [this](http://openradar.appspot.com/15993891) radar for more details)

[jasoncabot](https://github.com/jasoncabot) posted a nice workaround on this:

You can do the following to monitor these requests
<pre>
if let bodyData = mutableURLRequest.HTTPBody {
    NSURLProtocol.setProperty(bodyData, forKey: "NFXBodyData", inRequest: mutableURLRequest)
}
</pre>

Tip for Alamofire users: Subclass URLRequestConvertible and make all the work there<commit_msg>When using Alamofire with a custom Manager the default headers were not being sent with every request<commit_after>#### Alamofire workaround

Due to the way Alamofire uses NSURLSession, you’ll need to do a little more than the standard installation to monitor all requests. The simplest way to do this is to create a subclass of Manager to handle your requests as this

<pre>
import Alamofire

class NFXManager: Alamofire.Manager
{
    static let sharedManager: NFXManager = {
        let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
        configuration.protocolClasses?.insert(NFXProtocol.self, atIndex: 0)
        configuration.HTTPAdditionalHeaders = Manager.defaultHTTPHeaders
        let manager = NFXManager(configuration: configuration)
        return manager
    }()
}
</pre>

Then just use NFXManager.sharedManager instead of Alamofire.request()

#### No HTTP body for requests

Unfortunately, due to a limitation in NSURLProtocol, netfox is unable to log the HTTP body of some requests (check [this](http://openradar.appspot.com/15993891) radar for more details)

[jasoncabot](https://github.com/jasoncabot) posted a nice workaround on this:

You can do the following to monitor these requests
<pre>
if let bodyData = mutableURLRequest.HTTPBody {
    NSURLProtocol.setProperty(bodyData, forKey: "NFXBodyData", inRequest: mutableURLRequest)
}
</pre>

Tip for Alamofire users: Subclass URLRequestConvertible and make all the work there
{'fraction_non_alphanumeric': 0.06719367588932806, 'fraction_numerical': 0.0064678404599353215, 'mean_word_length': 4.775933609958506, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5472227', 'n_tokens_mistral': 772, 'n_tokens_neox': 752, 'n_words': 301}