Push the functionality of writing request body up to BaseAPI.

Signed-off-by: johnmave126 <johnmave126@gmail.com>