private void addRequiredParametersToRequest ( HttpPost request ) { parameters . put ( "Action" , operationName ) ; parameters . put ( "Version" , serviceEndpoint . version ) ; parameters . put ( "Timestamp" , MwsUtl . getFormattedTimestamp ( ) ) ; parameters . put ( "AWSAccessKeyId" , connection . getAwsAccessKeyId ( ) ) ; String signature = MwsUtl . signParameters ( serviceEndpoint . uri , connection . getSignatureVersion ( ) , connection . getSignatureMethod ( ) , parameters , connection . getAwsSecretKeyId ( ) ) ; parameters . put ( "Signature" , signature ) ; List < NameValuePair > parameterList = new ArrayList < NameValuePair > ( ) ; for ( Entry < String , String > entry : parameters . entrySet ( ) ) { String key = entry . getKey ( ) ; String value = entry . getValue ( ) ; if ( ! ( key == null || key . equals ( "" ) || value == null || value . equals ( "" ) ) ) { parameterList . add ( new BasicNameValuePair ( key , value ) ) ; } } try { request . setEntity ( new UrlEncodedFormEntity ( parameterList , "UTF-8" ) ) ; } catch ( Exception e ) { throw MwsUtl . wrap ( e ) ; } }
Add authentication related and version parameter and set request body with all of the parameters