Measuring length if no content length supplied.
This commit is contained in:
parent
da3df17699
commit
cade92cc63
|
@ -131,7 +131,7 @@ module RestModule {
|
||||||
data = await response.text()
|
data = await response.text()
|
||||||
raw = data
|
raw = data
|
||||||
}
|
}
|
||||||
const size = formatBytes(response.headers.get("content-length") || 0)
|
const size = formatBytes(response.headers.get("content-length") || Buffer.byteLength(raw, "utf8"))
|
||||||
const time = `${Math.round(performance.now() - this.startTimeMs)}ms`
|
const time = `${Math.round(performance.now() - this.startTimeMs)}ms`
|
||||||
headers = response.headers.raw()
|
headers = response.headers.raw()
|
||||||
for (let [key, value] of Object.entries(headers)) {
|
for (let [key, value] of Object.entries(headers)) {
|
||||||
|
|
Loading…
Reference in New Issue