Feature: CAM-4069 I can set custom request headers using the HTTP-Client in JS SDK#11
Conversation
|
Thank you for the pull request! The code itself looks fine, but it would be awesome if you could provide some test cases for this feature. |
|
I agree that tests are needed. Unfortunately the current mocking strategy for tests makes it impossible to test anything in HttpClient |
|
Then we should have a look at how we do the testing to make it possible :) We are currently busy finishing the 7.4 release, but should be able to have a look at it next month. |
|
My vote is to use superagent-mock and completly remove This was a pretty urgent requirement for us, so we're going to be using it already, but that doesn't really count as testing. |
|
+1 for removing the HttpClientMock |
|
I updated superagent and replaced the mocking strategy with superagent-mock. I also added a small utility to test the header before sending it. Merged with 3352110 |
I need custom headers to allow authentication through a gateway. I saw there was already an open ticket for this feature: CAM-4069
Example usage: