documentUrl method

String documentUrl(
  1. String collection, [
  2. String? id
])

The URL for a collection, or for one document in it.

Both parts are caller-supplied, so both are encoded - see joinPath.

Implementation

String documentUrl(String collection, [String? id]) {
  return joinPath(config.getDatabaseUrl(), [collection, ?id]);
}