curl -X GET https://ngp-apim-dev.azure-api.net/api/mdr/products \
-H "Accept: application/json" \
-H "Ocp-Apim-Subscription-Key: abcdef0123456789abcdef0123456789"
So, based on the documentation at
https://docs.basex.org/wiki/HTTP_Client_Module, for XQuery I used:
let $response := http:send-request(
<http:request method='get' href='https://ngp-apim-dev.azure-api.net/api/mdr/products'>
<http:header name="Ocp-Apim-Subscription-Key" value="{$apikey}"/>
</http:request>)
and:
let $response := http:send-request(
<http:request method='get'>
<http:header name="Ocp-Apim-Subscription-Key" value="{$apikey}"/>
</http:request>,'https://ngp-apim-dev.azure-api.net/api/mdr/products')
where $apikey is my personal key, which works when working with curl or in a Java program.
but I get a "Connection failed".
From a few experiments, it looks as the server is reached, but then refuses to do something with the request. I cannot see however what the details of the failure is.