Skip to content

grafana/k6-jslib-formdata

Repository files navigation

k6-jslib-formdata

FormData implements polyfill for k6.

This simplifies the creation of multipart/form-data requests from k6 scripts. It was adapted from the original version by Rob Wu to remove references of XMLHttpRequest and File related code which isn't supported in k6.

Usage

import { FormData } from 'https://jslib.k6.io/formdata/0.0.2/index.js';

See the k6 documentation website for more details on how to use the FormData object.