-
Notifications
You must be signed in to change notification settings - Fork 51
Feature request - Pass Request default options #87
Comments
Or another option would be to provide support in the Postman request for passing that are globally defined. https://k6.io/docs/javascript-api/k6-http/params/ Example
I'm not sure if the Postman request function uses all the "options"? Example script.js file
Which results in the following K6 call
UPDATE: I created a separate PR that would allow the passing of the K6 params as options, which will be used when making the Postman requests via K6. #88 |
Hi, Got it! Looks really good. I'll try to process the PRs as soon as possible, although I'm quite swamped at the moment so I can't promise I'll get to it this week. Thanks again for your excellent contributions! 🙇🏼 Best, |
@simskij Take your time. Don't need to rush it. I have made a merged branch with which I am using the PRs combined, so I can use it until you have tested it. Thank you for the excellent package. |
Hi @simskij
Related to #81 , I'm looking into way to set the "headers" globally to overwrite the default" x-www-form-urlencoded".
It seems that it is not (yet) supported grafana/k6#761 (comment) .
I might have a feature request, but before I try to figure how to code it as a PR, I wanted to receive your input, if you think it is valuable.
Currently the package support "options" for setting Postman execution related data & variables (https://github.com/k6io/postman-to-k6#options)
It would help to be able to pass the Request "options", that are being used in the generated script.js file
The feature request would be pass a Request options object that will extend/overwrite the Postman Request methods like the "headers".
Idea:
--request-options ./request-headers.json
which would contain custom options like
{ headers: { 'Content-Type': 'application/json' } }
Which would result in the Postman request, that gets extended by the passed on request headers.
This would be "default" options that you pass, which would apply for all requests.
Where the "headers" section got extended from
to
The text was updated successfully, but these errors were encountered: