fixed URI::InvalidURIError caused by unescaped params.

Added escape params in get_response method.