private Map < String , String > getHttpHeaders ( String restUrl ) throws Exception { // return if already created... if ( this . requestHttpHeaders != null ) return this . requestHttpHeaders ; // ...or initialize with default headers Map < String , String > httpHeaders = new HashMap <> ( ) ; // content type httpHeaders . put ( "Content-Type" , "application/json" ) ; // AuthenticationHelper http header if ( this . authRequired ) { AuthenticationHelper authHlp = new AuthenticationHelper ( root ) ; httpHeaders . putAll ( authHlp . getHttpHeaderKey ( ) ) ; } return httpHeaders ; }
Gets HTTP header to use in request .