common-lispdrakma

PURI:URI how to get the actual string represented


Drakma returns an PURI:URI object as a fourth return value. But I want to extract the actual string and not mess around with the object.

What is the name of the accessor as puri:uri-string which accesses directly the corresponding slot is not public in the package and the documentation is not existing.

Anybody who has some experience using that package?

Currently I am using (FORMAT nil "~a" URI) as a quickfix, but this cannot be what the author intended.


Solution

  • Use puri:render-uri. Note that it takes a stream to render the uri to as a second argument.