oauth-v2-client
Version:
Oauth V2 client based on axios
18 lines (17 loc) • 505 B
JavaScript
;
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;