Remove User-Agent header

Is it possible to send a GET request without a User-Agent header (not even the default k6 or go header) with k6?
It seems like the get function automatically adds it if its not present in the options.
I’ve also tried to override it with CLI flag ‘–user-agent=’ but then I get the default go header.
I’d really appreciate your help.

Hi @eden123

This seems to work:

import http from "k6/http";
import { check } from "k6";

export default function() {
    var url = ""
    var res = http.get(url, {"headers": {"user-agent": ""}});

Funny… I was really sure I’ve tried it

I have also made a fix for the --user-agent, but it might not land in v0.29.0

Good to know :slight_smile:
Thanks a lot!