Difference between Setting & Adding the Headers in HTTP API in Golang
While working with APIs, headers are an essential aspect. Sometimes we set them, or sometimes we consume them and make decisions. When I was exploring headers in Golang, I came across two methods. Headers.Set() & Headers.Add() Initially, I thought they were the same. But then I wondered if they are the same, then why two methods? Let鈥檚 understand. I will be using a proxy which will use Add & Set on headers, as shown below,...