Skip to content

Commit

Permalink
Fixed curl URLs in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ffissore committed Jan 17, 2020
1 parent 9655eac commit 2441e65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@ <h5>Speed</h5>
fetch(endpoint)
.then(res => Promise.all([res.url, res.json()]))
.then(([url, obj]) => {
document.querySelector(".simple_example").innerHTML = `curl ${url}\n\n${JSON.stringify(obj, null, 2)}`;
document.querySelector(".simple_example").innerHTML = `curl '${url}'\n\n${JSON.stringify(obj, null, 2)}`;
return obj.ip_address;
})
.then(ip_address => {
return Promise.all([
fetch(`${endpoint}?ip=${ip_address}`)
.then(res => Promise.all([res.url, res.json()]))
.then(([url, obj]) => {
document.querySelector(".specified_example").innerHTML = `curl ${url}\n\n${JSON.stringify(obj, null, 2)}`;
document.querySelector(".specified_example").innerHTML = `curl '${url}'\n\n${JSON.stringify(obj, null, 2)}`;
}),
fetch(`${endpoint}?ip=${ip_address}&callback=my_function`)
.then(res => Promise.all([res.url, res.text()]))
.then(([url, text]) => {
document.querySelector(".jsonp_example").innerHTML = `curl ${url}\n\n`;
document.querySelector(".jsonp_example").innerHTML = `curl '${url}'\n\n`;
eval(text);
}),
fetch(`${endpoint}?ip=${ip_address}&lang=ja&callback=my_japanese_function`)
.then(res => Promise.all([res.url, res.text()]))
.then(([url, text]) => {
document.querySelector(".jsonp_ja_example").innerHTML = `curl ${url}\n\n`;
document.querySelector(".jsonp_ja_example").innerHTML = `curl '${url}'\n\n`;
eval(text);
}),
])
Expand Down

0 comments on commit 2441e65

Please sign in to comment.