Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A REST API to echo same JSON data back for testing purposes

I am currently developing a front-end app with React. During the development, I create some objects and use them to render test data. The app is intended to work with a Spring Boot application on the server side. I have performed certain tests to ensure communication between front and back end before, however to simplify my development process I thought about using a RESTful API (that is ideally available online as a free testing service) where I would send JSON objects and receive the same object back.

I realize that this sounds counter-intuitive, but here is my reasoning:

  • I already create my own data, but creating a temporary API just to test would be time loss.
  • I don't mind still having to pollute my front-end with the data I am normally expected to receive from back-end, because I'll be more aware of the network interaction of my components while implementing them.

So the point is not exactly the data we fetch, but the way we fetch it. Currently I won't be working with our own back-end application since it is just too bloated/incomplete to work with. Using publicly available test APIs with their predetermined data types seems infeasible, because I happen to work with a specific data type that has a lot of custom and necessary fields.

I made some quick searching, but couldn't find an API like that. I could create a fast REST API locally, but that would be far from ideal in my case given that on a realistic scenario I'll have the delay and slightly different asynchronous nature of network interaction, not to mention CORS related configurations etc.

To be short, my question is as follows:

Is it a known practice to use such API's that receives POST requests and responds same objects back (although it sounds weird)? Is there any service that you could recommend for me to use?

Thanks in advance.

like image 811
Bonellia Avatar asked Jul 10 '26 16:07

Bonellia


1 Answers

There's another ECHO api that's a little easier to use by zuplo.com at https://echo.zuplo.io - you don't need to add the method to the URL, it just echoes everything, including the method, back at you.

like image 68
ConfusedNoob Avatar answered Jul 13 '26 08:07

ConfusedNoob



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!