How to add Batch Requests along a tag name for each request?

I have a list of batch requests … in that dynamic values, I want to add a tag name so that it will get static name instead of dynamic url.

I know using the groups we can do it, but I want to use it with batch requests. Any idea how to add custom name in batch requests for dynamic urls.

const responses = http.batch([
                  
      ['GET', 'https://websitename.com/api/token', { headers: params,}],
      ['GET', 'https://websitename.com/api/feedback', { headers: params,}],
      ['GET', `https://websitename.com/api/${userid}/`, { headers: params,}],

so above 3rd URL I want to use a tag : name

thanks,

I got it… used the below code to work it out.

const responses = http.batch([
                  
      ['GET', 'https://websitename.com/api/token', { headers: params,}],
      ['GET', 'https://websitename.com/api/feedback', { headers: params,}],
      ['GET', `https://websitename.com/api/${userid}/`, { headers: params,},
         {tags : {name: "/api/userid/"}],
1 Like