Interfacing with REST
REST refers to a software architecture style that’s designed to create scalable web services. It has gained widespread acceptance across the web as a simpler alternative to SOAP and WSDL-based web services.
RESTful systems typically communicate over hypertext transfer protocol with the same HTTP verbs (GET
, POST
, PUT
, DELETE
, and so on) used by web browsers to retrieve web pages and send data to remote servers.
With the prevalence of web servers, many systems now feature REST APIs and can return plain text or structured information. A typical example of plain text might be a time-of-day service, but structured information is more common for complex requests as it contains meta-information to identify the various fields.
Historically, this was returned as XML, but recently, JSON has become more popular since this is more compact and ideal for the web, where bandwidth may be limited. As with XML, which we looked at earlier, the JSON representation...