Making a GET request with Axios hosted on the Bitcoin blockchain
Background
Making a GET request with Axios hosted on the Bitcoin blockchain
Background
I’m a software/hardware developer and a video artist that likes to create tech that doesn’t exist with the goal of empowering others. Doing my best to find tools that are available to everyone. I’ve Bitcoin Ordinal inscribed with the minified Axios version 1.4.0 library, making it available as a CDN on the Bitcoin blockchain. Here, I want to create a website that executes a HTTP GET request using the JavaScript library hosted on the Bitcoin blockchain.
References
Why does this matter?

Mozilla — HTTP Overview
- HTTP is a protocol for fetching resources such as HTML documents & media. It is the foundation of any data exchange on the Web and it is a client-server protocol, which means requests are initiated by the recipient, usually the Web browser. (Mozilla)
- HTTP was invented alongside HTML to create the first interactive, text-based web browser: the original World Wide Web. Today, the protocol remains one of the primary means of using the Internet. (ExtraHop)
- Without HTTP (Hypertext Transfer Protocol), the World Wide Web as we know it today would not exist. HTTP is the protocol that enables the transfer of data over the internet, allowing users to access websites and other online resources. (freeCodeCamp)
Ok, enough background, let’s cook.
Putting together a GET request
Start with a new HTML5 file.
<html>
<!-- empty -->
</html>
Next, add the head element to the file.
<html>
<head>
...
</head>
</html>
Add the title of the example and add the route to the axios Bitcoin Ordinal NFT.
<html>
<head>
<title>My first Bitcoin HTTP/HTTPS request</title>
<script src="https://ordinals.com/content/6b81993428a217a341ffd68f3b3aa3664b2cfc674d57aad0d3b6daa0f125b821i0"></script>
</head>
</html>
Create a body tag below the head element.
<html>
<head>
<title>My first Bitcoin HTTP/HTTPS request</title>
<script src="https://ordinals.com/content/6b81993428a217a341ffd68f3b3aa3664b2cfc674d57aad0d3b6daa0f125b821i0"></script>
</head>
<body>
...
</body>
</html>
We want to trigger our GET request, let’s add a button. Don’t forget to check the browser inspector for the response data.
<html>
<head>
<title>My first Bitcoin HTTP/HTTPS request</title>
<script src="https://ordinals.com/content/6b81993428a217a341ffd68f3b3aa3664b2cfc674d57aad0d3b6daa0f125b821i0"></script>
</head>
<body>
<p>Click to make GET request</p>
<p>Check browser inspector for data</p>
<button id="myButton">Click me!</button>
</body>
</html>
Let’s add the JavaScript. A button listener waits for the user to press the button within the webpage or client.
<html>
<head>
<title>My first Bitcoin HTTP/HTTPS request</title>
<script src="https://ordinals.com/content/6b81993428a217a341ffd68f3b3aa3664b2cfc674d57aad0d3b6daa0f125b821i0"></script>
</head>
<body>
<p>Click to make GET request</p>
<p>Check browser inspector for data</p>
<button id="myButton">Click me!</button>
</body>
<script>
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
...
});
</script>
</html>
That event will trigger the axios.get and the data response can be viewed using the browser’s inspector tool.
<html>
<head>
<title>My first Bitcoin HTTP/HTTPS request</title>
<script src="https://ordinals.com/content/6b81993428a217a341ffd68f3b3aa3664b2cfc674d57aad0d3b6daa0f125b821i0"></script>
</head>
<body>
<p>Click to make GET request</p>
<p>Check browser inspector for data</p>
<button id="myButton">Click me!</button>
</body>
<script>
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
axios.get('https://jsonplaceholder.typicode.com/posts/1')
.then(function(response) {
console.log(response.data);
})
.catch(function(error) {
console.log(error);
});
});
</script>
</html>
It will look something like this …

Done!
breakfast is success
Final thoughts
This is the first time a HTTP/HTTPS protocol, such as Axios, to be inscribed onto the Bitcoin blockchain. You can access the Bitcoin version of Axios by calling the Ordinal URL using the <script> tag. It’s a transitional time for web protocols and this pushes the perception of what can be done with blockchain technology. It’s your turn, change the world.
Developer Notes
06/19/23: I used a “button” example because of my observation of how websites were loading the <iframe> tag as a gallery in marketplaces. Each time a tag loaded, it was a new instance. So let’s say you made a webpage that executed a HTTP request at load time. This could overload your web browser and freeze it.
FAQ
Here is primer if you are unfamiliar with concepts mentioned above.
Bitcoin Ordinals: The new Ordinals protocol allows people who operate Bitcoin nodes to inscribe each sat with data, creating something called an Ordinal. That data inscribed on Bitcoin can include smart contracts, which in turn enables NFTs. In rough terms, Ordinals are NFTs you can mint directly onto the Bitcoin blockchain.
메타데이터
- post_id
- 5068f34b5b4e
- slug
- making-a-get-request-with-axios-hosted-on-the-bitcoin-blockchain-5068f34b5b4e
- url
- https://medium.com/@schwwaaa/making-a-get-request-with-axios-hosted-on-the-bitcoin-blockchain-5068f34b5b4e
- canonical_url
- https://medium.com/@schwwaaa/making-a-get-request-with-axios-hosted-on-the-bitcoin-blockchain-5068f34b5b4e
- author_url
- https://medium.com/@schwwaaa
- status
- ok
- fetched_at
- 2026-06-29 01:02:39