public static void addOptionalHeader ( final HttpURLConnection request , final String name , final String value ) { if ( value != null && ! value . equals ( Constants . EMPTY_STRING ) ) { request . setRequestProperty ( name , value ) ; } }
Adds the optional header .