feat: parse and run REST request params

* package-lock.json:
This commit is contained in:
Andrew Bastin
2021-07-20 18:53:24 -04:00
parent 1573ddad1b
commit cd908ae1b2
2 changed files with 13 additions and 4 deletions

View File

@@ -60,12 +60,17 @@ export function createRESTNetworkRequestStream(
return Object.assign(acc, { [key]: value })
}, {})
const params = req.effectiveFinalParams.reduce((acc, { key, value }) => {
return Object.assign(acc, { [key]: value })
}, {})
const timeStart = Date.now()
runAppropriateStrategy({
method: req.method as any,
url: req.effectiveFinalURL,
headers,
params,
})
.then((res: any) => {
const timeEnd = Date.now()