How to properly retrieve a path from TARGETURI:

uri = target_uri.path

Reference:
https://github.com/rapid7/metasploit-framework/wiki/How-to-Send-an-HTTP-Request-Using-HTTPClient