title: React Native Http Interceptor
body: <p>Like most applications, I'm writing an application that requires a lot of similar logic in the http response/requests handlers. For instance, I have to always check for refresh tokens and save them to the AsyncStorage, or always set the headers to my AuthService headers, or even check for 404 to route to the same 404 error page. </p>
  
  <p>I'm a big fan of the http interceptor in Angular; where you can define and register an http interceptor to (lack of a better term) intercept all http traffic and then run the combined, common logic. </p>
  
  <p>I have 2 main questions: </p>
  
  <ol>
  <li>Since in React Native, we define these independent components, should we <strong>not</strong> be extracting common http logic in the first place in order to preserve the re-usability of the component?</li>
  <li>If we don't want to duplicate code, is there a way in React Native (first) or Objective-C/Swift (second) to intercept http traffic and provide handlers for the requests?</li>
  </ol>