Why do I not get the response as RAW API RESPONSE specified by Dialogflow?

Jeeva Bharathi

I asked this question before, came to a wrong conclusion because Dialogflow V1 client library gives response in the format specified by Dialogflow and Dialogflow V2 client did not so I thought the response format has changed. I used

response.query_result.parameters.fields

to access the parameters sent by the Dialogflow in an object format and not a JSON string. Where did I go wrong or is the response format correct and Google did not update the Dialogflow documentation?

Ariel

I don't have anything set up right now in nodeJS to test this, but translating from my python requests I think that it should be

request.body.queryResult.parameters['fields']

idk if this could also be helpful to you but in python my code looks like this

req = request.get_json(silent=True, force=True)
auth_code = req.get('queryResult').get('parameters').get('number')

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Get raw HTTP response with Retrofit

How do I get value from ValuesView? Trying to make sense of Dialogflow response for my bot

Get RAW header of http response

Why do I get the error message "http: response.Write on hijacked connection"?

Why I get a SOA dig response?

Why do I get the error AttributeError: 'module' object has no attribute 'Response' in my SMS app that interfaces with Twilio?

Why do I get error AttributeError: 'Response' object has no attribute 'get' in Python2.7?

How to get text response directly on Dialogflow?

How do I get a response from this website?

Dialogflow SDK or Dialogflow REST API, which is faster in term of response time?

How do I get a users response in Dialogflow

Why am I getting a 403 error response with my SurveyMonkey API get request?

Why do i always get NULL in php response when i try to send some variable using ajax

Why do I get empty response for regexp_matches function while using positive lookahead (?=...)

Why do I get a 'None" Response for this? What does this mean exactly?

Why i get no response on cUrl with class?

How do I get Okta to return a sorted API response?

Why do I get this error/warning related to writing a response header?

get raw xml response from amazon mws api

How do i get the response from prompt

Fetch api, why do I have to use then on the response json(), trying to make sens of promises

Why do I get undefined for response.name?

Why do I always get undefined response with this ajax post to php?

Why do i get the error AttributeError: 'Response' object has no attribute 'type'?

Why do I not get any content with python requests get, but still a 200 response?

Why do I get scrapy response empty?

How do I get a users response in Lambda

How do I get a parameter from an API response URL?

(Angular) How do I output an API Get response into a variable