🧩 Feature request
Description
The JSON Plugin is great to fetch data from an API. However sometimes API are not public and to access those Data an API key or other HTTP headers are needed to be sent when requesting the API.
Describe the solution you'd like
The scully config should accept a headers object for the JSON Plugin where a user can specify one or more headers when requesting the endpoint:
// scully.config.js
exports.config = {
routes: {
"/user/:userId": {
"type": "json",
"userId": {
"url": "https://my-api.com/users",
"property": "id",
"headers": {
"X-API-Key": "27482824848327373",
}
}
}
}
};
Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?
🧩 Feature request
Description
The JSON Plugin is great to fetch data from an API. However sometimes API are not public and to access those Data an API key or other HTTP headers are needed to be sent when requesting the API.
Describe the solution you'd like
The scully config should accept a
headersobject for the JSON Plugin where a user can specify one or more headers when requesting the endpoint:Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?