Click here to Skip to main content
15,671,318 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to send the req object as whole in another request e.g axios and process the req object in api rather than inside route that will be some where else.
here is my route code"/adddata", async (req, res) => {
  const result = await"fun/add",req);
  res.send(data );


here I will have images and data in req object. so i will have to upload the images first get their ids and then pass them to api. rather i want do that image upload inside that api

The req object that i am sending in (which is an axios request), i want this req object treated as the actual req object in Axios request to some external api or something like that. there may some way out.

Thank you

What I have tried:

tried to send the req objext as a whole, but axios post request does not accept it and needs to send this as a param
Updated 21-Feb-22 21:29pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900