title: Error: Invalid or unknown request type (not a Dialogflow v1 or v2 webhook request)
body: <p>when i run <code>firebase serve --only functions</code> </p>
  
  <p>this is my code: </p>
  
  <pre><code>exports.helloWorld = functions.https.onRequest((request, response) =&gt; {
    const agent = new WebhookClient({ request, response });
    console.log('Dialogflow Request headers: ' + JSON.stringify(request.headers));
    console.log('Dialogflow Request body: ' + JSON.stringify(request.body));
  
  function findWidget(agent) {
    agent.add(`You are now being handled by the productivity intent`);
    const url = "https://reqres.in/api/users?page=2";
    return request.get(url)
        .then(jsonBody =&gt; {
            var body = JSON.parse(jsonBody);
            agent.add(body.data[0].first_name)
            return Promise.resolve(agent);
        })
        .catch(err =&gt; {
            console.error('Problem making network call', err);
            agent.add('Unable to get result');
            return Promise.resolve(agent);
        });
    };
  
    let intentMap = new Map();
    intentMap.set('Default Welcome Intent', findWidget);
    agent.handleRequest(intentMap);
  });
  
  </code></pre>
  
  <p>pls help me fix this problem, i don't know what wrong with that.</p>
  
  <p>Update:error image: <a href="https://i.stack.imgur.com/1YDP2.png" rel="nofollow noreferrer">https://i.stack.imgur.com/1YDP2.png</a>
          screenshot browser: <a href="https://i.stack.imgur.com/uPV9w.png" rel="nofollow noreferrer">https://i.stack.imgur.com/uPV9w.png</a></p>