If a client sends a text/html Content-Type header in the get request (spurious, but not disallowed) then it causes the API to error:
$ curl --header "Content-Type: text/html" https://api.carbonintensity.org.uk:443/regional/regionid/10
{
"error": {
"code": "400 Bad Request",
"message": "Unsupported Media Type"
}
This header is correctly ignored in the national API and works finr, it's only the Regional API that appears to choke on it.
$ curl --header "Content-Type: text/html" https://api.carbonintensity.org.uk/intensity
{
"data":[{
"from": "2023-08-31T11:30Z",
"to": "2023-08-31T12:00Z",
"intensity": {
"forecast": 191,
"actual": 190,
"index": "moderate"
}
}]