Web
Making an call to the web endpoint
Fetch website from blockchain
Retrieve a website based on the blockchain and transaction id's (txid) provided.
Retrieve website
POST
https://api.bloqifi.com/v0/web
Retrieve a website
Headers
Content-Type*
String
application/json
Request Body
txids*
Array
List of transaction id's ['123', '321']
blockchain*
String
Bloqcoin
, Dogecoin
, Bitcoin
Brotli compressed data if there is Content-Encoding support, otherwise raw text/html
The web endpoint will take all the transaction ids provided, merge the received hex strings containing OP_RETURN together and combine these into the final content. Bloqcoin is the obvious choice, as it supports 102480; //!< bytes (+1 for OP_RETURN, +2 for the pushdata opcodes). And as such can host an entire website in one transaction id.
Take a look at how you might call this method using our official libraries, or via curl
:
Let’s consider what the output of our response should look like:
If the browser or client is capable of decompressing Brotli
, then a compressed version of the output is delivered as the content is already compressed in the blockchain.
Fetch website from IPFS
Retrieve a website based on the hash provided.
Retrieve website
GET
https://storage.bloqifi.com/ipfs/CID
Retrieve a website
Brotli compressed data if there is Content-Encoding support, otherwise raw text/html
Configure a custom domain name for your IPFS
If you'd prefer to use a friendly DNS name for your website, such as www.example.com, instead of the default DNS name. You can create a custom domain name and associate it with the DNS name.
When a client makes a request using this custom domain name, the DNS server resolves it to the DNS name for your IPFS content.
Next, use your DNS service, such as your domain registrar, to create a CNAME record to route queries to your IPFS content. For more information, see the documentation for your DNS service.
Last updated
Was this helpful?