private HttpPost createRequest ( ) { HttpPost request = new HttpPost ( serviceEndpoint . uri ) ; try { request . addHeader ( "Content-Type" , "application/x-www-form-urlencoded; charset=utf-8" ) ; request . addHeader ( "X-Amazon-User-Agent" , connection . getUserAgent ( ) ) ; for ( Map . Entry < String , String > header : connection . getRequestHeaders ( ) . entrySet ( ) ) { request . addHeader ( header . getKey ( ) , header . getValue ( ) ) ; } addRequiredParametersToRequest ( request ) ; } catch ( Exception e ) { request . releaseConnection ( ) ; throw MwsUtl . wrap ( e ) ; } return request ; }
Create a HttpPost request for this call and add required headers and parameters to it .