code: private String getSimpleHeaderValue(String header, HttpResponse httpResponse, boolean first) {
      if (StringUtils.isBlank(header)) {
        return StringUtils.EMPTY;
      }
  
      Header h;
      if (first) {
        h = httpResponse.getFirstHeader(header);
      } else {
        h = httpResponse.getLastHeader(header);
      }
      if (h == null) {
        return null;
      }
      return h.getValue();
    }
docs: Easy method for HTTP header values (first/last)