User defined tags in requests and batch?


#1

How to use user defined tags in post request and in batch method as well ?

(question copied from k6 slack channel)


#2

You can put a tags field in the params options as with the http.get (https://docs.k6.io/docs/tags-and-groups#section-user-defined-tags).

You should put body in the case of http.post if it has to be empty you can put null, empty string or empty object. In the case of http.batch you can look at the documentation https://docs.k6.io/docs/batch-requests to see how params is defined and used.

(answer copied from k6 slack channel)