REST API - Fake Data

Fake REST API for testing with any frontend

Always on!

Ready for your requests 24x7!...

...

CORS Enabled

all resources can be accessed on any domain

Consistent data

All requests are processed on a real rest backend.




Check it yourself!




Request

      	
      

Response

		     
      





How to use?

examples



Jquery POST Request

$.ajax({
url: "https://onlinetool.in/api/",
type: "POST",
data: {
    "username": "johndoe",
    "password": "mypassword"
},
success: function(response, textStatus, xhr) {
    console.log(response);
    console.log(response.status);
},
error: function(response) {
    console.log(response.responseText);
    console.log(response.status);
}
})		
		


Angular GET Request

this.http.get('http://onlinetool.in/api/').subscribe(data => {
 console.log(data);
});					
		

JavaScript GET Request

const Http = new XMLHttpRequest();
const url='https://onlinetool.in/api/';
Http.open("GET", url);
Http.send();
Http.onreadystatechange=(e)=>{
console.log(Http.responseText)
}	
	

Angular POST Request

this.http.post('https://onlinetool.in/api/', {
  "homepage": "google.com",
  "description": "search engine",
 })
 .subscribe(
  res => {
   console.log(res);
  },
  (err: HttpErrorResponse) => {
   if (err.error instanceof Error) {
    console.log("Client-side error occured.");
   } else {
    console.log("Server-side error occured.");
   }
  }
 );
	



Paths

GET: /api/posts/

GET: /api/posts/1

GET: /api/comments/?post=1

GET: /api/posts/?author=1

POST: /api/posts/

PUT: /api/posts/1/

PATCH: /api/posts/1/

DELETE: /api/posts/1/

Relations: Posts can have many comments and a post can have one author




Free of cost

Its always free...

No matter how many requests!...

Unlimited Requests

no limits!.. free of charge.

Django rest framework

Its running on DRF, one of the most popular rest framewoks out there!