Monday, May 20, 2024
HomeCSSHelpful Instruments For Mocking API Requests

Helpful Instruments For Mocking API Requests


In the midst of my work I generally discover myself needing to mock API requests — usually after I’m prototyping, or testing an idea for an article. There are a few helpful (free) instruments I attain for on these events.

n:level

Screenshot of n:point website

n:level supplies light-weight, publicly accessible API endpoints to your JSON knowledge. It’s tremendous straightforward to make use of: merely give it some JSON and it units up an endpoint in seconds. No messing about with entry tokens, it’s excellent if you happen to simply need to fetch some knowledge. You may also outline and lock the JSON schema. I’m utilizing n:level for a Codrops article on creating an interactive line graph based mostly on timeseries knowledge.

Mockeroo

Screenshot of Mockeroo website

If you should truly generate some knowledge, Mockeroo is a device that allows you to do exactly that. You possibly can add rows of various sorts and Mockeroo will generate random knowledge. There are configuration choices, together with setting ranges (for numbers and dates, for instance), and together with null values. When you’re completely satisfied writing Ruby, you too can embody formulation and you’ll obtain the information in several codecs.

I’ve solely used Mockeroo for producing JSON, however you too can create API endpoints. It’s not as fast as n:level to arrange, however seems helpful if you should mock any extra advanced API requests.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments