I am trying to trigger a GET request where I need to send two cookies (I obtain these through inspecting my browser cookies once I authenticate into my website) that authorises my request. However, when I try the below ruby code using the faraday gem I receive an unauthorised access error, which isn't the case when I use postman to send the same cookie data ( https://learning.postman.com/docs/sending-requests/cookies/). Can anyone see what I am doing wrong?
url = "https://someurl.com/random_data"
resp = Faraday.get(url) do |req|
req.headers['cookie'] = '{"credential_1":' + @credentials["credential_1"] + ',"credential_2":' + @credentials["credential_2"]}'
end