We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Issue:
Hi guys thanks for the great work!
I am running into an issue with eden treaty where the client call api.get() is making the request to /ge instead of /.
Deps:
"dependencies": { "@elysiajs/eden": "^0.6.4", "@elysiajs/swagger": "^0.6.2", "elysia": "latest" }, "devDependencies": { "bun-types": "latest" },
Code: Server:
import { Elysia, t } from "elysia"; import { swagger } from "@elysiajs/swagger"; const app = new Elysia() .use(swagger()) .get("/", () => "Hello Elysia") .get("/id/:id", ({ params: { id } }) => id) .post("/json", ({ body }) => body, { body: t.Object({ name: t.String(), }), query: t.Object({ id: t.String(), }), }) .listen(3000); console.log( `Elysia running at http://${app.server?.hostname}:${app.server?.port}` ); export type App = typeof app;
client:
import { edenTreaty } from "@elysiajs/eden"; import type { App } from "./http"; const api = edenTreaty<App>("http://0.0.0.0:3000"); const response = await api.get({}); console.log(response);
result:
{ data: "NOT_FOUND", error: 1 | status; 2 | value; 3 | constructor(e, t) { 4 | 5 | super(), this.status = e, this.value = t; status: 404, raw: Response (0 KB) { ok: false, url: "http://0.0.0.0:3000/ge", headers: Headers { "content-type": "text/plain;charset=utf-8", "date": "Mon, 11 Sep 2023 22:57:21 GMT", "content-length": "9" }, statusText: "Not Found", redirected: false, bodyUsed: true, status: 404 }, headers: Headers { "content-type": "text/plain;charset=utf-8", "date": "Mon, 11 Sep 2023 22:57:21 GMT", "content-length": "9" } }
The text was updated successfully, but these errors were encountered:
🔧 fix: #15, #17
4f68fe6
Updating to Eden 0.6.5 should fixed the problem
Sorry, something went wrong.
No branches or pull requests
Issue:
Hi guys thanks for the great work!
I am running into an issue with eden treaty where the client call api.get() is making the request to /ge instead of /.
Deps:
Code:
Server:
client:
result:
The text was updated successfully, but these errors were encountered: