-
Notifications
You must be signed in to change notification settings - Fork 92
What is the syntax for "params" ? #28
Comments
I finally chose to call a childProcess which is a npm package (child_process) and use directly the curl version from the cloudflare documentation, looks like :
|
@hach3 "params" is the JSON object required by the API, which you can see an example of in the documentation. In this case. cf.dnsRecords.add({
type: 'CNAME',
name: username + '.ilikestream.com',
content: 'ilikestream.com'.
ttl: 120,
proxied: true
}); There's definitely room for improvement to the node binding's documentation. |
using version Response code 400 (Bad Request) 💥 let resp = await cf.dnsRecords.add('SOME_ZONE_ID', {
type: 'CNAME',
name: 'some.domain.ext',
content: '1.1.1.1',
proxied: true,
}) However, the same |
No, zone ID is required for DNS operations, my example above is wrong. It looks like you really want to set an A record, not a CNAME. |
Hello there ! Thanks for the creation of this api tool. I wan't to create a dnsRecord but I don't understand how to write the params. Can i eventually get an example ? Thanks for answer ! <3
The text was updated successfully, but these errors were encountered: