Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Update request.size to async
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 committed May 28, 2024
1 parent 91a43c9 commit 2a09dc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion browser/request_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ func mapRequest(vu moduleVU, r *common.Request) mapping {
return mapResponse(vu, resp), nil
})
},
"size": r.Size,
"size": func(name string) *goja.Promise {
return k6ext.Promise(vu.Context(), func() (any, error) {
return r.Size(), nil
})
},
"timing": r.Timing,
"url": r.URL,
}
Expand Down

0 comments on commit 2a09dc1

Please sign in to comment.