Skip to content

Commit

Permalink
Revert request.headers
Browse files Browse the repository at this point in the history
We're matching Playwright's behaviour here which has a sync API for
request.headers. We're also only loading data from memory.
  • Loading branch information
ankur22 committed May 29, 2024
1 parent 8ad8e07 commit 6dca115
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 @@ -25,11 +25,7 @@ func mapRequest(vu moduleVU, r *common.Request) mapping {
return r.HeaderValue(name), nil
})
},
"headers": func() *goja.Promise {
return k6ext.Promise(vu.Context(), func() (any, error) {
return r.Headers(), nil
})
},
"headers": r.Headers,
"headersArray": func() *goja.Promise {
return k6ext.Promise(vu.Context(), func() (any, error) {
return r.HeadersArray(), nil
Expand Down

0 comments on commit 6dca115

Please sign in to comment.