1

I am building extension for azure pipelines task. I need to call an endpoint which accepts bearer token. What is the right way to pass it in the headers?

task.json

 "dataSourceBindings":[
  {
      "target": "uielement",
      "endpointId": "$(FabrikamService)",
      "dataSourceName": "GetProjectsWithToken",
      "parameters":{
         "Bearer":"mytoken"
  }

}

vss-manifest.json

"dataSources":[
 {
        "name": "GetProjectsWithToken",
        "endpointUrl": "{{endpoint.url}}/api/project/list",
        "requestVerb": "Get",
        "requestContent": null,
        "resourceUrl": "",
        "resultSelector": "jsonpath:"
       
 }

Thanks

Rohit
  • 10,056
  • 7
  • 50
  • 82

0 Answers0