Menu

What is a Rest API
📰

What is a Rest API

DEV Community: backend·Asime Domitila·about 3 hours ago
#XBagCM7c
#devtobackend#devto#dev#rest#apis
Reading 0:00
15s threshold

Imagine walking into a high-end restaurant where the menu is written like a twenty-page legal contract, every dish must be ordered using an exact formulaic script(XML), and you have to wear a three-piece suit just to place an order. That was essentially the world of SOAP web APIs back in the day.

XML (Extensible Markup Language):

XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. It was the standard way to transmit data in older APIs (like SOAP). It looks very similar to HTML, using custom tags to define data structures.

<user> <id> 1 </id> <name> John Doe </name> <email> [email protected] </email> </user>

Enter fullscreen mode

Exit fullscreen mode

Then came REST, changing the game entirely—like a friendly, flexible neighborhood café where you walk up, point at what you want, and get a neat little JSON package right back without any unnecessary fuss.

JSON (JavaScript Object Notation):

JSON is a lightweight…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.