This API allows you to generate a unique URL for a given HTML content.
- You must have access to the internet to be able to use this API.
- You must have a basic understanding of how to make API calls using JavaScript.
To use this API, follow these steps:
- Copy the code snippet below and replace
'<html><body><h1>Hello, world!</h1></body></html>'
with your own HTML content.
const htmlContent = '<html><body><h1>Hello, world!</h1></body></html>';
let count = 0;
const intervalId = setInterval(() => {
if (count >= 1) {
clearInterval(intervalId);
return;
}
fetch('https:/thrivehub.destools.ink/generate', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ htmlContent: htmlContent })
})
.then(response => response.text())
.then(url => {
console.log(`Generated URL: ${url}`);
// Use the generated URL as needed
})
.catch(error => console.error(error));
count++;
}, 1000); // Interval of 1 second (1000 milliseconds)
-
Open your JavaScript console in your web browser and paste the code.
-
The
htmlContent
variable should contain the HTML code you want to generate a unique URL for. -
The API call will execute every 1 second (1000 milliseconds) for a maximum of 2 times (
count >= 2
). You can adjust this interval and maximum count to suit your needs. -
Once the API call is successful, the generated URL will be logged to the console.
-
You can then use the generated URL as needed.
- This API does not store any data and the generated URLs are only valid for a short period of time.
- If you encounter any issues or have any questions, please join the discord server!.