Encode both keys and values in the query string