code: private String removeTrailingSlash(final String objName) {
      if (objName.endsWith("/")) {
        return objName.substring(0, objName.length() - 1);
      }
      return objName;
    }
docs: removing the trailing slash because it is not supported in Swift
  an request on an object (not a container) that has a trailing slash will lead
  to a 404 response message