UNPKG

oauth-v2-client

Version:
18 lines (17 loc) 505 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var querystring_1 = require("querystring"); /** * Format request according to the body type * @param bodyType request body type * @param body request body */ function renderRequestBody(bodyType, body) { switch (bodyType) { case "x-www-form-urlencoded": return (0, querystring_1.stringify)(body); default: return body; } } exports.default = renderRequestBody;