quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast Episode #42 Retrying HTTP Requests

Retrying HTTP Requests - NSScreencast

token取得のretry

  • automatically detect expired authentication tokens
  • [self secureValueForKey:AUTH_TOKEN_KEY];
  • if (operation.response.statusCode == 401)
    • [self.credentialStore setAuthToken:nil];
  • refactoring
    • mixing system level concern and view level
    • UserAuthenticator
      • fetchSecureMessageWithSuccess
      • typedef void (^UserAuthenticatedBlock)();
      • refreshTokenAndRetryOperation
  • XCodeのdebugで音を鳴らす
  • Charles
    • HTTP proxy

ブロックがらみのリファクタリング難しい