Fix for incorrect headers

This commit is contained in:
navaneeth 2021-05-20 10:08:11 +05:30
parent ab237be807
commit d41a70f502

View file

@ -13,6 +13,7 @@ class RestapiQueryService
url = options['url']
method = options['method']
headers = options['headers'].reject { |header| header[0].empty? }
headers = headers.to_h
body = options['body']
url_params = options['url_params']
@ -30,7 +31,7 @@ class RestapiQueryService
if source_options['add_token_to'] === 'header'
headers = {
**headers.to_h,
**headers,
'Authorization': "Bearer #{token}"
}
end