hubot icon indicating copy to clipboard operation
hubot copied to clipboard

how to pass two header k v?

Open Doltair opened this issue 5 years ago • 2 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!!

Doltair avatar Feb 14 '20 12:02 Doltair

Did you find a solution for this?

pradipta avatar Aug 15 '20 16:08 pradipta

You can try this: robot.http(url) .headers( 'Content-Type': "application/json", 'Cookie': "CookieSTring" ) .post(data) (err, res, body) -> Your Code

pradipta avatar Aug 15 '20 16:08 pradipta

Gone stale. Reopen if you still need assistance.

joeyguerra avatar Apr 17 '23 21:04 joeyguerra