Test REST API with unREST – part 2

In the previous post, we’ve seen the basics how to work with unREST. This time, I’ll showcase some advanced and (hopefully) more interesting features it has. Sending request body With HTTP POST requests, you usually need to send some data as request body, usually JSON. unREST provides convenient ways to add this data:

In …

Test REST API with unREST – part 2Read More »

Object Oriented JavaScript – polymorphism

In previous post about object-oriented programming in JavaScript, we described how inheritance works. In this post, I’ll cover one more important concept of object oriented programming – polymorphism. I will not go into theoretical details, since there many online resources available, such as this Wikipedia page. Rather, I will try to explain how polymorphism can …

Object Oriented JavaScript – polymorphismRead More »

Object oriented JavaScript – encapsulation

In previous post, I wrote about inheritance in JavaScript. This time, I will cover another important concept in object-oriented programming – encapsulation. Class-based languages like Java and C++ provide built-in keywords like private¬† and protected¬† which facilitate implementing much of the concepts covered by encapsulation. By contrast, JavaScript, being prototype-based language, does not provide these …

Object oriented JavaScript – encapsulationRead More »