Trim excess whitespace from post body

The way restclient handles post body, leaves some whitespace at the end.
I'm using an API now that doesn't trim properly. This fixes that.

Hopefully people aren't relying on sending spaces and newlines at the end of a post body. What do you think?