UNPKG

typerinth

Version:

A TypeScript library for interacting with the Modrinth API.

22 lines (21 loc) 511 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.JsonRequestBody = void 0; const RequestBody_1 = require("./RequestBody"); /** * JSON request body */ class JsonRequestBody extends RequestBody_1.RequestBody { data; constructor(data) { super(); this.data = data; } getContentType() { return 'application/json'; } getFormattedBody() { return JSON.stringify(this.data); } } exports.JsonRequestBody = JsonRequestBody;