-
-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shortcomings with client $url
method
#1464
Comments
Hi @renzor-fist This could be a difficult challenge. const { method } = hc<AppType>('http://localhost:3000').v1.deployment.$request() I think this method is difficult because there may be more than one method in |
cc: @ehagishi What do you think about it? |
Hi. Have you considered extending the path like this? const { method, url } = hc<AppType>('http://localhost:3000').v1.deployment.$get.$request() If you just want to test with the hc client, using #1451 would be the simpler approach, in my opinion. |
Thanks! You are right, there is a TypeScript “type" issue. I just tried a little and could not infer it well. It may be very difficult or impossible. @hagishi Do you have any idea? |
What is the feature you are proposing?
Hi @yusukebe, I recently added this feature. #1384
However, the
URL
type doesn't include the routemethod
(e.g. GET, POST, ...), a critical part of the shape of a route. For example, when mocking responses using this new$url
method:Wanted to get your thoughts on possibly improving
$url
to includemethod
, or possibly adding a$request
method that returns theRequest
typeInterested in your thoughts on this. I'd be happy to make any desired changes.
The text was updated successfully, but these errors were encountered: