getDocument method
Get Document
Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
Implementation
Future<req.Response> getDocument(
{required String collectionId, required String documentId}) {
final String path =
'/database/collections/{collectionId}/documents/{documentId}'
.replaceAll(RegExp('{collectionId}'), collectionId)
.replaceAll(RegExp('{documentId}'), documentId);
final Map<String, dynamic> params = {};
final Map<String, String> headers = {
'content-type': 'application/json',
};
return client.call(HttpMethod.get,
path: path, params: params, headers: headers);
}