First upload version 0.0.1
This commit is contained in:
14
node_modules/@octokit/oauth-app/dist-src/middleware/node/parse-request.js
generated
vendored
Normal file
14
node_modules/@octokit/oauth-app/dist-src/middleware/node/parse-request.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
function parseRequest(request) {
|
||||
const { method, url, headers } = request;
|
||||
async function text() {
|
||||
const text2 = await new Promise((resolve, reject) => {
|
||||
let bodyChunks = [];
|
||||
request.on("error", reject).on("data", (chunk) => bodyChunks.push(chunk)).on("end", () => resolve(Buffer.concat(bodyChunks).toString()));
|
||||
});
|
||||
return text2;
|
||||
}
|
||||
return { method, url, headers, text };
|
||||
}
|
||||
export {
|
||||
parseRequest
|
||||
};
|
||||
Reference in New Issue
Block a user