WindowsAzure/azure-sdk-for-node — pull request #1182 by ryan1234 (2014-03-21 18:58:36+00:00)
Title: Reimage role instance API call by slot/name should not have a request body

MSDN documentation for Reimage Role Instance says the request body should be empty. Also confirmed by the content-length being 0. http://msdn.microsoft.com/en-us/library/windowsazure/gg441292.aspx

In webresource.js (https://github.com/WindowsAzure/azure-sdk-for-node/blob/master/lib/common/lib/http/webresource.js#L277) the isMethodWithBody() function assumes that if the method is a POST, then we have a body. This seems to be true for many (most) Azure REST calls, but not the re-image calls.

Setting the body to null made my calls succeed. Without the two new lines, the calls don't work.