Platform
Resources
Pricing
Sign in
Get started
Chris Adams
Environmentally focussed tech generalist. User research, product management and strategy, and yes, even code sometimes
Workspace
Fork
Public
By
Chris Adams
Edited
Apr 20, 2023
Insert cell
Insert cell
Insert cell
viewof
checkURL
=
Inputs
.
url
(
{
label
:
"Carbon.txt URL to check"
}
)
Insert cell
fetchOptions
=
{
return
{
method
:
"POST"
,
headers
:
{
Accept
:
"application/json"
,
"Content-Type"
:
"application/json"
,
}
,
body
:
JSON
.
stringify
(
{
url
:
checkURL
}
)
}
}
Insert cell
data
=
await
fetch
(
"https://api.thegreenwebfoundation.org/api/v3/carbontxt"
,
fetchOptions
)
.
then
(
(
response
)
=>
response
.
json
(
)
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
checkURL
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fetchOptions
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML