-
-
Notifications
You must be signed in to change notification settings - Fork 751
Open
Labels
enhancementNew feature or request.New feature or request.
Description
What is the feature you are proposing?
Currently, the Hono client always returns an absolute URL object when using the $url() method. This creates issues when working with relative paths, especially in environments where the base URL might change or when building URLs that need to remain relative.
Current Behavior
const client = hc('/api');
const url = client.users.$url(); // Returns URL object with absolute path
The code in client.js always returns new URL(result), which converts relative paths to absolute URLs based on the current origin. and throwing an error.
Expected Behavior
Provide an option to return relative URLs as strings instead of URL objects.
michael-pont
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request.New feature or request.