`ODataRequestRead` with https://<tenant_url>/api/v1/dwc/consumption/relational/<space_id>/<asset_id>/$metadata results in 406
The documentation here says that hitting
https://<tenant_url>/api/v1/dwc/consumption/relational/<space_id>/<asset_id>/$metadata
will retrieve metadata but the following results in a 406 response.
ODataRequestRead( "/api/v1/dwc/consumption/relational/('$spaceId')/('$assetId')/$metadata" . ODataResourcePath.of(""), . "", ODataProtocol.V4 ).execute(httpClient)`
The reason is that the JSON looks like this
{ "@odata.context": "XX", "name": "XX", "label": "XX", "spaceName": "XX", "assetRelationalMetadataUrl": null, "assetRelationalDataUrl": null, "assetAnalyticalMetadataUrl": "XX", "assetAnalyticalDataUrl": "XX", "supportsAnalyticalQueries": true, "hasParameters": false }
But the code to parse the JSON here requires it to have a value node.
May I ask, what do you expect from calling GET to an OData entity /$metadata endpoint? Compared to a regularly calling GET to the entity?
SAP Cloud SDK is not designed to interpret $metadata payload. If you insist on calling the endpoint, please consume the HttpResponse manually yourself.