I'm trying to get JSON data from an API by using SQL Server 2016. I am able to get the data where API doesn't need user credentials however if I need to provide user name and password I cannot get the data.

```
DECLARE @authHeader VARCHAR(8000);
DECLARE @contentType VARCHAR(8000);
DECLARE @postData VARCHAR(8000);
DECLARE @responseText VARCHAR(8000);
DECLARE @responseXML VARCHAR(8000);
DECLARE @ret INT;
DECLARE @status VARCHAR(8000);
DECLARE @statusText VARCHAR(8000);
DECLARE @token INT;
DECLARE @url VARCHAR(8000);
DECLARE @JSON VARCHAR(8000);

SET @authHeader = 'BASIC QWERTYASDFGH1234567890123456789==';
SET @contentType = 'application/json';
SET @url = 'https://example.example.com/api/product-list?area=12345&fromMonth=201811&toMonth=201812'

-- Open the connection.
EXEC @ret = sp_OACreate 'MSXML2.ServerXMLHTTP', @token OUT;
IF @ret <> 0 RAISERROR('Unable to open HTTP connection.', 10, 1);

-- Send the request.

EXEC @ret = sp_OAMethod @token, 'Open', null, 'GET', @Url, 'false'
EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'Authorization', @authHeader;
EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'Content-type', @contentType;

EXEC sp_OAMethod @token, 'send', null
EXEC sp_OAMethod @token, 'responseText', @ResponseText OUTPUT

SET @JSON = @ResponseText
SELECT @JSON 

```

Does anyone know how to pass Authorization header properly from SQL Server?