This might be useful as a check().

IRT URL encoding. I have had issues with this in the past, with msf encoding it in a weird way that causes the payload to fail. I have opted to do it this way because of this.