bug fixes and typos

Some functions were calling requestBody when they should have reference
requestBase.

requestBase function was also trying to use the $method variable when
$request_method should have been used. This should fix issues for PUT
and DELETE calls.