Encode request body