Allowing empty body in HTTP client POST and PUT requests

Fixes #362 by checking for presence of body before creating the content-md5 hash header.