Fix URI encode process

For GET requests, the query params must be correctly encoded and the
urlencoded_data method is not handling utf8 strings.