Made with-
- nextJS
- prisma
- postgresql
- chakra UI
deployed on
- App on vercel
- Database on heroku
Send a post
request to https://throw-me.now.sh/api/create/
with body as:
{
"url": "https://google.com/",
"name": "google"
}
var url = "https://throw-me.now.sh/api/create/";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.status);
console.log(xhr.responseText);
}};
var data = `{
"url": "https://google.com/",
"name": "google"
}`;
xhr.send(data);
Send a post
request to https://throw-me.now.sh/api/get/
with body as:
{
"name": "theName"
}
var url = "https://throw-me.now.sh/api/get/";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.status);
console.log(xhr.responseText);
}};
var data = `{
"name": "google"
}
`;
xhr.send(data);
- the url has a limit of 200 characters
- the name has a limit of 20 characters