With Azure DevOps YAML task "Invoke-HTTP", I keep getting
Exception message 'Exception Message: Invalid JavaScript property identifier character: -. Path '', line 1, position 8. (type JsonReaderException)'
Here is the documentation of task:
The script is as follows:
jobs:
# Publish resource group artifact
- job: invoke_http_for_ase
pool: server
continueOnError: true
steps:
# Invoke REST API
# Invoke a REST API as a part of your pipeline.
- task: InvokeRESTAPI@1
displayName: 'GET Member'
inputs:
connectionType: 'connectedServiceNameARM'
azureServiceConnection: 'ARM-Service-Connection'
method: 'GET'
headers: '{Content-Type:application/json}'
urlSuffix: "subscriptions/xxx/resourceGroups/xxx?api-version=2018-05-01"
waitForCompletion: 'true'
And the same works from the designer with the Release Task within the release pipeline.