code: 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);
          }
      }
docs: Adds the optional header.
  
  @param request
  a HttpURLConnection for the operation.
  @param name
  the metadata name.
  @param value
  the metadata value.