0

Below is the method from index.js

function costOfItemHandler(agent) {
    const itemName = agent.parameters.foodItem;
    const url = "https://fast-beach-13460.herokuapp.com/Eatery";
    return axios.get(url)
        .then((result) => {
            console.log('result is '+ result);   
        });

In the log it is coming textPayload: "result is [object Object]". Where as when I am browsing the url it is giving proper response.

1 Answers1

0

Try this:

console.log('result is ', result);

If you append an object to a string it returns [object, Object].

eaeaoo
  • 116
  • 2