hubot
hubot copied to clipboard
how to pass two header k v?
My Case:
res.http("#{ApiUrl}")
.header('Authorization', "Bearer #{OAuth}", 'X-API-KEY', "Bearer, #{JWTtoken}"'Content-Type', 'application/json')
.post(data) (err, response, body) ->
The second token JWT is not read by hubot, only the first one which is the Authorization.
What is the best practice to have two key,values for Headers? in my case passing two tokens? Thank you!!
Did you find a solution for this?
You can try this:
robot.http(url) .headers( 'Content-Type': "application/json", 'Cookie': "CookieSTring" ) .post(data) (err, res, body) -> Your Code
Gone stale. Reopen if you still need assistance.