Add cleanup step
Remove unneeded runtime parameter validation
Make sure SSL is running when making a HTTPS request [#1], handle error better
Note that content-type needs to be set as well