-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FormData example #203
Comments
👍 I was planning to pick this up starting today. Too soon? The polyfill works even without #1800, since it only needs |
Yeah, I didn't realize it, but that's awesome! Maybe some of the issues above wouldn't be closed until we release k6 v0.31.0, but most should be fine with what we have in k6 v0.30.0. I'll make sure to review grafana/jslib.k6.io#21 tomorrow then. |
After grafana/k6#1800 and grafana/jslib.k6.io#21 are merged (i.e. k6 v0.31.0), we should add an example that demonstrates how to build advanced
multipart/form-data
request bodies with them. As evidenced by grafana/k6#747, grafana/k6#843, grafana/k6#1375, grafana/k6#1382, grafana/k6#1571, grafana/k6#1784, the current k6 HTTP API is quite restricted and can't cover a lot of corner cases... 😞 We'll close these issues (grafana/k6#1800 (comment)), so we probably should also add warning messages in https://k6.io/docs/javascript-api/k6-http/file-data-filename-contenttype and https://k6.io/docs/javascript-api/k6-http/filedata to use the JS polyfill for the corner cases the Go API can't cover.At some future point, we'll try to fix all of these deficiencies with a new and better k6 JS API for HTTP requests, but until then this polyfill will likely be sufficient for 99% of users, with almost no downsides. So, we should document it properly.
The text was updated successfully, but these errors were encountered: