public void processHeaderParams ( Map < String , String > headerParams , Request . Builder reqBuilder ) { for ( Entry < String , String > param : headerParams . entrySet ( ) ) { reqBuilder . header ( param . getKey ( ) , parameterToString ( param . getValue ( ) ) ) ; } for ( Entry < String , String > header : defaultHeaderMap . entrySet ( ) ) { if ( ! headerParams . containsKey ( header . getKey ( ) ) ) { reqBuilder . header ( header . getKey ( ) , parameterToString ( header . getValue ( ) ) ) ; } } }
Set header parameters to the request builder including default headers .