static void addHeaders ( HttpUriRequest req , String mimeType ) { if ( POST . equalsIgnoreCase ( req . getMethod ( ) ) ) { req . addHeader ( CONTENT_TYPE , FORM_ENCODED ) ; } if ( mimeType != null ) req . setHeader ( ACCEPT , mimeType ) ; }
Add headers to a request .