Coder Social home page Coder Social logo

Comments (2)

Canain avatar Canain commented on May 30, 2024 2

Hi,

This is because the Assistant App is expecting an options variable which is expecting the properties of options to contain request and response.

These two lines:

const appAi = new App({ request, response });
const appAi = new App({ req, res });

are giving completely different inputs

They are using ES6 property definitions short notation and are equivalent to:

const appAi = new App({ request: request, response: response });
const appAi = new App({ req: req, res: res });

If you have variables with the names req and res that you want to pass in, then do:

const appAi = new App({
  request: req,
  response: res
});

Can you elaborate on what you mean by With the others handlers that do not use this module everything works both with "req" or "request"?

from actions-on-google-nodejs.

Iridio avatar Iridio commented on May 30, 2024

I get it, thanks for the prompt response. My mistake, other that I am a noob with JS, is that I took the sample from your documentation and not from the read.me in this project that is more clear.
The last part was to try to give you as much info as possible, what I was trying to say, is that in the other hanlders, were I was using the variables req and res I was not getting any sort of problem.

from actions-on-google-nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.