protected void addDefaultHeaders ( final HttpRequest httpRequest ) { for ( Map . Entry < String , String > entry : defaultHeaders . entries ( ) ) { String name = entry . getKey ( ) ; if ( ! httpRequest . headers . contains ( name ) ) { httpRequest . headers . add ( name , entry . getValue ( ) ) ; } } }
Add default headers to the request . If request already has a header set default header will be ignored .