I am building azure pipeline task which is calling an endpoint. However I keep getting error "unsupportedmediatype 415". here is my code
"dataSources": [
{
"name": "ProjectsEP",
"endpointUrl": "{{endpoint.url}}/api/project/projects",
"requestVerb": "Post",
"resultSelector": "jsonpath:",
"requestContent":"",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
"dataSourceBindings": [
{
"target": "project",
"endpointId": "$(FabrikamService)",
"dataSourceName": "ProjectsEP",
"requestVerb": "Post"
}]
I need to change the content-type to "application/json".
The same request works in postman
What am I missing here?