javascript - Angular Headers Web API -
i trying add x-apikeys headers every api call have examples in curl. have tried:
var accesskey = "gdgfdgdfgdgdgfdgdfgfdgfdgdgh"; var secretkey = "ggdgfdgdggtet565645654654654"; $http.get("/information",{ headers:{ {"x-apikeys": accesskey, secretkey}} )
i have tried make interceptor config:
config.headers['x-apikeys'] = {accesskey, secretkey}
the structure x-apikeys think causing me issues. have provided picture of http headers looking for.
full request header:
accept:*/* accept-encoding:gzip, deflate, sdch accept-language:en-us,en;q=0.8 access-control-request-headers:accept, x-apikeys access-control-request-method:get connection:keep-alive host: origin:http://localhost:60531 referer:http://localhost:60531/ user-agent:mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/48.0.2564.103 safari/537.36
try this:
$http.get("/information",{ headers: { 'x-apikeys': 'accesskey=' + accesskey+'; secretkey='+secretkey+';' }})
Comments
Post a Comment