I'm writing a superagent client for a PHP application.
I'm struggling to get one of the first examples to work:
.set('X-API-Key', 'foobar')
appears to send headers x-api-key: foobar
(and user-agent: node-superagent/1.7.2
) to server, so I lose the case. Is it normal (i.e. I should make serverside case-insensitive when working with superagent), or am I missing something?
A quick dive into superagent source code shows that there is intentional .toLowerCase
call, but it just doesn't seem right, does it?