mtulio / go-url

go-url is a cool URL tester that discovers all endpoints (IP address) and makes HTTP/S requests to each. It also can push metrics to the Pushgateway.
Apache License 2.0
5 stars 0 forks source link

Add support to specify headers for each url #16

Closed mtulio closed 2 years ago

mtulio commented 2 years ago

(

gurl -H "key1: value1" -H "key2: value2" (...)

or

gurl -H "key1: value1" -H "key2: value2" (...)

) and (

{
  "headers": {
    "Authorization": "Bearer X"
  }
  "urls":
  [
    {
      "url": "http://grafana.internal:3000/",
      "headers": {
        "Authorization": "Bearer Y"
      }
    },
    {
      "proto": "http",
      "server": "ifconfig.co",
      "port": 80,
      "path": "/json",
      "timeout": 5,
      "headers": {
        "Authorization": "Bearer Z"
      }
    }
  ]
}

)