To easily visualize the client-server relationship and the request-response type of messaging, we can think of a mobile currency application acting as a client and some remote website, such as http://api.fixer.io/
, being the server. The server exposes one or more URL endpoints, allowing communication exchange, such as http://api.fixer.io/latest?symbols=USD,GBP
. The mobile application can easily issue a HTTP GET http://api.fixer.io/latest?symbols=GBP,HRK,USD
request, which then results in a response like this:
{ "base": "EUR", "date": "2017-03-10", "rates": { "GBP": 0.8725, "HRK": 7.419, "USD": 1.0606 } }
The HTTP GET
keyword is used to denote the type of operation we want to perform on the receiver located on the remote (server) system that we contact via URL. The response contains JSON-formatted data, which our mobile currency application can easily digest and make use of. This specific message exchange example is what we flag...