Fix issues related to PUT and POST.

In order to fix the issue mentioned in https://github.com/mex/rent-it-client/pull/8, we need to set the ``Content-Type`` to ``application/json`` when the HTTP method is a POST or PUT request. Furthermore, we need to pass in ``options.body`` for the ``JSON.parse`` method instead of ``body``.