https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42753 Bug ID: 42753 Summary: item-api-client.js: items.get() should accept headers parameter instead of hardcoding x-koha-embed Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com ItemAPIClient.items.get(id) hardcodes x-koha-embed: '+strings' in the request headers. This should be passed through from the caller (like getAll already does) so different consumers can request different embeds. Current: get: id => this.httpClient.get({ endpoint: 'items/' + id, headers: { 'x-koha-embed': '+strings' }, }), Should be: get: (id, params = {}) => this.httpClient.get({ endpoint: 'items/' + id, ...params, }), Callers that need +strings would pass it explicitly: APIClient.item.items.get(id, { headers: { 'x-koha-embed': '+strings' } }) This follows the same pass-through pattern used for bundled_items.add(). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.