private void sign ( RequestHandler requestHandler ) throws QSException { if ( callBack != null ) { String signed = callBack . onSignature ( requestHandler . getStringToSignature ( ) ) ; if ( ! QSStringUtil . isEmpty ( signed ) ) requestHandler . setSignature ( callBack . onAccessKey ( ) , signed ) ; String correctTime = callBack . onCorrectTime ( requestHandler . getStringToSignature ( ) ) ; if ( correctTime != null && correctTime . trim ( ) . length ( ) > 0 ) requestHandler . getBuilder ( ) . setHeader ( QSConstant . HEADER_PARAM_KEY_DATE , correctTime ) ; } }
When sending a request will call this method to sign with server .