mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-12 07:58:49 +00:00
Enhancement: Add requestBody param for customapi (#2921)
This commit is contained in:
parent
0d47dcaac7
commit
c268739e1f
2 changed files with 20 additions and 0 deletions
|
@ -35,6 +35,12 @@ export default async function genericProxyHandler(req, res, map) {
|
|||
};
|
||||
if (req.body) {
|
||||
params.body = req.body;
|
||||
} else if (widget.requestBody) {
|
||||
if (typeof widget.requestBody === "object") {
|
||||
params.body = JSON.stringify(widget.requestBody);
|
||||
} else {
|
||||
params.body = widget.requestBody;
|
||||
}
|
||||
}
|
||||
|
||||
const [status, contentType, data] = await httpProxy(url, params);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue