Skip to content

Commit

Permalink
[ACS-6805] getNodeContent allows adding additional options (#9343)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKinas committed Feb 15, 2024
1 parent 1d3a7b1 commit 8d5f3c9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/js-api/src/api/content-rest-api/api/nodes.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,18 @@ export class NodesApi extends BaseApi {
};

const queryParams = {
attachment: opts?.attachment
attachment: opts?.attachment ?? null
};

const headerParams = {
'If-Modified-Since': opts?.ifModifiedSince,
Range: opts?.range
};
const headerParams = {};

if (opts?.ifModifiedSince) {
Object.defineProperty(headerParams, 'If-Modified-Since', { value: opts?.ifModifiedSince });
}

if (opts?.range) {
Object.defineProperty(headerParams, 'Range', { value: opts?.range });
}

const accepts = ['application/octet-stream'];

Expand Down

0 comments on commit 8d5f3c9

Please sign in to comment.