mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
DOCS: consistency in code examples in language reference (#2394)
This commit is contained in:
committed by
GitHub
parent
0b7dabacc8
commit
e97cf01744
@@ -22,14 +22,14 @@ Otherwise the syntax of `FETCH` is the same as `fetch`.
|
||||
|
||||
{% code title="dnsconfig.js" %}
|
||||
```javascript
|
||||
var REG_NONE = NewRegistrar('none');
|
||||
var DNS_BIND = NewDnsProvider('bind');
|
||||
var REG_NONE = NewRegistrar("none");
|
||||
var DNS_BIND = NewDnsProvider("bind");
|
||||
|
||||
D('example.com', REG_NONE, DnsProvider(DNS_BIND), [
|
||||
A('@', '1.2.3.4'),
|
||||
D("example.com", REG_NONE, DnsProvider(DNS_BIND), [
|
||||
A("@", "1.2.3.4"),
|
||||
]);
|
||||
|
||||
FETCH('https://example.com', {
|
||||
FETCH("https://example.com", {
|
||||
// All three options below are optional
|
||||
headers: {"X-Authentication": "barfoo"},
|
||||
method: "POST",
|
||||
@@ -38,8 +38,8 @@ FETCH('https://example.com', {
|
||||
return r.text();
|
||||
}).then(function(t) {
|
||||
// Example of generating record based on response
|
||||
D_EXTEND('example.com', [
|
||||
TXT('@', t.slice(0, 100)),
|
||||
D_EXTEND("example.com", [
|
||||
TXT("@", t.slice(0, 100)),
|
||||
]);
|
||||
});
|
||||
```
|
||||
|
Reference in New Issue
Block a user