1

I need to pass two headers with the same key in my $http request. This is a server requirement that can't be changed.

{ "Authorization": "Basic XXXX", "Authorization": "Basic YYYY" }

You pass headers into $http as an object, so I don't know how to send duplicate keys.

Dave Clark
  • 31
  • 2

1 Answers1

2

I found the answer to my own question. The HTTP Spec requires that these two things are equal:

Header: Value1
Header: Value2

and

Header: Value1, Value2

And the second way is compatible with object literals.

See Are Duplicate HTTP Response Headers acceptable?

Community
  • 1
  • 1
Dave Clark
  • 31
  • 2