I am utilizing the SAP Cloud SDK for javascript to manage DocumentInfoRecords. Upon updating a DIR, I encountered error 428. Therefore, I require the etag of the request similar to what is available in the SAP Cloud API.
How can I retrieve the etag from the GET request or access header response information for each sdk request?
GET:
DocumentInfoRecord.requestBuilder()
.getByKey(dir.documentInfoRecordDocType, dir.documentInfoRecordDocVersion, dir.documentInfoRecordDocNumber, dir.documentInfoRecordDocPart)
.execute({});
UPDATE with etag
DocumentInfoRecord.requestBuilder().update(dir).withCustomHeaders({ key: "If-Match", value: "etag" }).execute({});