encode the whole of query string