Re: [fetch] `user-agent` header control (#37)

Given the requirements and existing constraints I see a couple of options:

1. `User-Agent` is passed in as part of `headers`. We provide a distinct `omitUserAgent` boolean option for removing any `User-Agent` headers from the request in the network layer. `omitUserAgent` is also put on `Request.prototype`. The network layer only appends `User-Agent` header with a default value if no `User-Agent` header is present.
2. `userAgent` is an option that is undefined, null, or a header value. undefined indicates the network layer inserts a `User-Agent` header with a default value. null means the network layer does nothing. A header value means the network layer inserts `User-Agent` header with that value.

2 seems a little cleaner to me, but I don't care strongly.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/37#issuecomment-90493922

Received on Tuesday, 7 April 2015 10:03:31 UTC