code: public static List<String> extractPathParams(final String url) {
  
      final List<String> pathParams = new ArrayList<>();
      int index = url.indexOf('{');
  
      while (index >= 0) {
  
        final int endIndex = url.indexOf('}', index);
        final String pathParam = url.substring(index + 1, endIndex);
        pathParams.add(pathParam);
        index = url.indexOf('{', endIndex);
      }
  
      return pathParams;
    }
docs: Extracts all path params in url
  
  @param url url to find path params in
  @return list of path params