Skip to content

Commit

Permalink
Revert request.size to sync
Browse files Browse the repository at this point in the history
request.size works with the same data as request.headers and
request.postData, both of which are sync APIs, therefore size is safe
to be a sync since data is loaded from memory.
  • Loading branch information
ankur22 committed May 29, 2024
1 parent 6dca115 commit bd6809b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions browser/request_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ func mapRequest(vu moduleVU, r *common.Request) mapping {
return mapResponse(vu, resp), nil
})
},
"size": func() *goja.Promise {
return k6ext.Promise(vu.Context(), func() (any, error) {
return r.Size(), nil
})
},
"size": r.Size,
"timing": r.Timing,
"url": r.URL,
}
Expand Down

0 comments on commit bd6809b

Please sign in to comment.