createDnsRecord always returns error
aidalgol opened this issue · 2 comments
aidalgol commented
A request like this
curl -H 'Authorization: Bearer deadbeef' \
--data \
'{"type":"A",
"hostname":"junk.example.net",
"value":"192.168.0.1",
"ttl":3600,
"priority":null,
"weight":null,
"port":null,
"flag":null,
"tag":null}' \
https://api.netlify.com/api/v1/dns_zones/feedbeef/dns_records/
responds with {"error":"undefined method end_with?’ for nil:NilClass"}`
aidalgol commented
Upon further experimentation, I have discovered that the Content-Type
header needs to be explicitly set by adding the option -H 'Content-Type: application/json'
.