hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneRestClient.java
private void addOzoneHeaders(HttpRequestBase httpRequest) {
    SimpleDateFormat format =
        new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss ZZZ", Locale.US);

    httpRequest.addHeader(Header.OZONE_VERSION_HEADER,
        Header.OZONE_V1_VERSION_HEADER);
    httpRequest.addHeader(HttpHeaders.DATE,
        format.format(new Date(Time.monotonicNow())));
    if (getUserAuth() != null) {
      httpRequest.addHeader(HttpHeaders.AUTHORIZATION,
          Header.OZONE_SIMPLE_AUTHENTICATION_SCHEME + " " +
              getUserAuth());
    }
  }
/**
   * Add Ozone Headers.
   *
   * @param httpRequest - Http Request
   */
Add Ozone Headers.
@param httpRequest - Http Request
Add Ozone Headers . @param httpRequest - Http Request
private void addOzoneHeaders(HttpRequestBase httpRequest) {
    SimpleDateFormat format =
        new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss ZZZ", Locale.US);
    httpRequest.addHeader(Header.OZONE_VERSION_HEADER,
        Header.OZONE_V1_VERSION_HEADER);
    httpRequest.addHeader(HttpHeaders.DATE,
        format.format(new Date(Time.monotonicNow())));
    if (getUserAuth() != null) {
      httpRequest.addHeader(HttpHeaders.AUTHORIZATION,
          Header.OZONE_SIMPLE_AUTHENTICATION_SCHEME + " " +
              getUserAuth());
    }
  }
private void addOzoneHeaders ( HttpRequestBase httpRequest ) { SimpleDateFormat format = new SimpleDateFormat ( "EEE, dd MMM yyyy HH:mm:ss ZZZ" , Locale . US ) ; httpRequest . addHeader ( Header . OZONE_VERSION_HEADER , Header . OZONE_V1_VERSION_HEADER ) ; httpRequest . addHeader ( HttpHeaders . DATE , format . format ( new Date ( Time . monotonicNow ( ) ) ) ) ; if ( getUserAuth ( ) != null ) { httpRequest . addHeader ( HttpHeaders . AUTHORIZATION , Header . OZONE_SIMPLE_AUTHENTICATION_SCHEME + " " + getUserAuth ( ) ) ; } }
Add Ozone Headers.
Add Ozone Headers .