17 lines
448 B
TypeScript
17 lines
448 B
TypeScript
// Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
|
|
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
const genJsonPayload = (payload: object): object => {
|
|
const value = {
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
body: JSON.stringify(payload),
|
|
};
|
|
return value;
|
|
};
|
|
|
|
export default genJsonPayload;
|