hubotio / hubot

A customizable life embetterment robot.

Home Page:https://hubotio.github.io/hubot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to pass two header k v?

Doltair opened this issue · comments

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.