Skip to content
ts
import { 
createHttpClient
} from "@duplojs/http/client";
type
Routes
= (
// Route generation type ); const
httpClient
=
createHttpClient
<
Routes
>({
baseUrl
: "http://example.com/api",
}); const
response
= await
httpClient
.
get
("/users/{userId}", {
params
: {
userId
: "1" } })
.
whenInformation
("users.find", ({
body
}) => {
void
body
;
}) .
iWantInformation
("users.find");

Released under the MIT License.