Add the encodeRequestString() method to the Environment class