Backstage provides a FetchApi to make requests this allows backstage users to create fetch customizations like automatic header
injections. This Pr modifies the announcements plugin to use the backstage fetch api, making it compatible with any backstage implementation using any fetch api customization.
Changes
Loads the fetch api when creating the api factory for the announcements api
Uses the fetch api in the default fetch api implementation
Additional Comments
The request object was removed as it was causing problems with the fetch api from backstage, the parameters were passed directly to the fetch call instead
const request = new Request(`${baseApiUrl}${input}`, {
...init,
headers,
});
Context
Backstage provides a FetchApi to make requests this allows backstage users to create fetch customizations like automatic header injections. This Pr modifies the announcements plugin to use the backstage fetch api, making it compatible with any backstage implementation using any fetch api customization.
Changes
Additional Comments
The request object was removed as it was causing problems with the fetch api from backstage, the parameters were passed directly to the fetch call instead
Reference
Fetch Api Reference: https://backstage.io/docs/reference/core-plugin-api.fetchapi/