Hi
I keep getting a 500 error when trying to trying to subscribe to the real-time price/dispatch API endpoints with a POST request (See trace below)
A similar issue was raised in this thread, but doesn;t seem applicable in my case - I have included the necessary header as suggested there:
https://www.emi.ea.govt.nz/Forum/thread/emi-real-time-data-post-and-options-action/
Any help greatly appreciated.
Thanks,
Selwyn
curl -v -X POST "https://emi.azure-api.net/rtp/" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key:$emi_subscription_key" --data-ascii '{ "name":"Selwyn McCracken" , "url":"https://emi-prices-dispatch.azurewebsites.net/api/emi?device=emi-prices&code=<SNIP>=="}'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 104.210.84.32...
* TCP_NODELAY set
* Connected to emi.azure-api.net (104.210.84.32) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=*.azure-api.net
* start date: Apr 16 16:31:18 2019 GMT
* expire date: Apr 16 16:31:18 2021 GMT
* subjectAltName: host "emi.azure-api.net" matched cert's "*.azure-api.net"
* issuer: C=US; ST=Washington; L=Redmond; O=Microsoft Corporation; OU=Microsoft IT; CN=Microsoft IT TLS CA 4
* SSL certificate verify ok.
> POST /rtp/ HTTP/1.1
> Host: emi.azure-api.net
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Type: application/json
> Ocp-Apim-Subscription-Key:<SNIP>
> Content-Length: 172
>
* upload completely sent off: 172 out of 172 bytes
< HTTP/1.1 500 Internal Server Error
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Length: 20
< Content-Type: text/plain; charset=utf-8
< Expires: -1
< Set-Cookie: ARRAffinity=8f5c4a6b7dfb612fc801877d67d0cec25c27a3045c85b4e0e1355cb34c997f82;Path=/;HttpOnly;Domain=ma-emiapi-realtime-prd.azurewebsites.net
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Date: Fri, 01 Nov 2019 04:52:19 GMT
<
* Connection #0 to host emi.azure-api.net left intact
An error has occured