Fix the order to remove the request when calling with cached data.

The previous order was removing the request from the list before calling
the listener with the cached data. As the listener is testing if the
request was in list, it was a no-op.
Now the listener will do work with the cached data as expected.

Fixes #25
Change the way PUT requests are executed.

Now they follow the same pattern as POST requests.
Also add the Content-Length header

Fixes #26