Back

What attributes does `req` and `res` have in node-appwrite (TypeScript) for 1.4?

  • 0
  • Functions
THE-E
24 Sep, 2023, 13:32

I am currently upgrading my appwrite functions and I have added the following code to access the variable req and res variables.

TypeScript
type Context = {
  req: any;
  res: any;
  log: (msg: any) => void;
  error: (msg: any) => void;
};

export default async ({ req, res, log, error }: Context) => {
//...
};

But because req and res are of type any I don't know which functions (e.g. res.send()/ res.json()) or attributes I can use safely. Is there a documentation for the current appwrite 1.4 or preferably a a class I can use for req and res?

TL;DR
The user is asking for documentation or a class for the `req` and `res` variables in node-appwrite (TypeScript) version 1.4. They currently have the code set up with `req` and `res` as `any` type and are unsure about the available functions and attributes. Solution: Unfortunately, the user did not provide any solution.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more