public Hop header ( String headerName , String headerValue ) { Assert . hasText ( headerName , "headerName must not be null or empty!" ) ; if ( this . headers == HttpHeaders . EMPTY ) { HttpHeaders newHeaders = new HttpHeaders ( ) ; newHeaders . add ( headerName , headerValue ) ; return new Hop ( this . rel , this . parameters , newHeaders ) ; } this . headers . add ( headerName , headerValue ) ; return this ; }
Add one header to the HttpHeaders collection .