BinaryVread method
Gets the contents of a version (current or historical) of a FHIR Binary resource by version ID.
This method can be used to retrieve a Binary resource version either by
using the FHIR JSON mimetype as the value for the Accept header, or as a
raw data stream. If the FHIR Accept type is used this method will return a
Binary resource with the data base64-encoded, regardless of how the
resource version was created. The resource data can be retrieved in
base64-decoded form if the Accept type of the request matches the value of
the resource version's contentType
field. The definition of the Binary
REST API can be found at https://hl7.org/fhir/binary.html#rest.
Request parameters:
name
- Required. The name of the Binary resource version to retrieve.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/datasets/\[^/\]+/fhirStores/\[^/\]+/fhir/Binary/\[^/\]+/_history/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a HttpBody.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<HttpBody> BinaryVread(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return HttpBody.fromJson(response_ as core.Map<core.String, core.dynamic>);
}