RESTful has been something on my mind for a very long time. Ever since i was young, i had stumbled upon something called RESTful… well back when i was still a young developer working on simple html pages for absolute joy.
Today, i will be posting some of the resources I feel that have been of great use to me when learning how RESTful works. If you’re interested to know more… you should definitely read every last word these articles have to offer.
The below shows how in relation the HTTP methods are with the normal CRUD operations and SQL operations. Picture is taken from scotch.io
There are four main parts to a simple HTTP request
- Endpoint (this is basically the url eg: github’s root-endpoint is api-github.com, root-endpoint basically means the starting point hence “root”)
- HTTP Method (covered above in the picture)
- Headers (just additional information about the request/response more information : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers)
- Content (data/body)
We’ve already covered what methods are.. and on to headers (Headers are simply property-value pairs– to me, this is really just a way of providing information to the client/server -eg so the server may know what this request/response is for… etc!)
As for Content… it’s just the information to be sent to the server. HTTP Status codes & error messages are just as important because they tell you what has happened to your request/response!
Picture is taken from smashingmagazine.com
Finally, i’ve really learnt a lot of what RESTful is due to my knowledge in applying it. I’ve made a simple web-application on C# with the help of what i’ve learnt in school. You’ll be able to download the demo (which helped me to learn here!!: https://github.com/bchewy/CSharp-HTTP-Methods-API-)
References (i do not any of the pictures posted above)
Smashingmagazine : https://www.smashingmagazine.com/2018/01/understanding-using-rest-api/