All About REST

Today, it has been all about REST. Please, don’t get me wrong. Not the legs up, tongue out rest. But REpresentational State Transfer rest. Yes lazy ass, turns out computers love to rest too.
So it begs the question, what is REST?
REST(from now hence forth referred to as rest. Nothing to do with laziness) is any simple interface used to transmit domain specific data over HTTP without need for additional messaging layers or session tracking. Boom! big words there. Domain -think name. The name of the web page you want to interact with. If I was a web page my domain would be Denis. HTTP refers to the protocols, rules, that govern the interaction of clients and web servers.
To simply describe REST, I’d simply rest(dry pun intended), but no. I’d say it describes the principles that keep things moving smoothly on the web and it’s more of an architectural style than it is a standard.
Today, being my third day at andela boot-camp xiv, I got to interact with requests. This is a HTTP library in python that embraces the whole idea of rest. You can check it out at http://docs.python-requests.org/en/master/ and go through it’s capabilities and documentation.
To use it, with python, you simply use import requests and there, voila, you have it. Given an URL, you just use it’s get method to interact with the website e.g to get a user’s git-hub information
response = requests.get(‘https://api.github.com/user', auth=(‘user’, ‘pass’))`With that said, I think I shall now REST.