Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/1.1 400 Bad Request Error when executing PostRequest() #6

Open
SurferLab opened this issue Jun 11, 2020 · 4 comments
Open

HTTP/1.1 400 Bad Request Error when executing PostRequest() #6

SurferLab opened this issue Jun 11, 2020 · 4 comments

Comments

@SurferLab
Copy link

Hello,

The error comes after the step 5 of the tutorial uniFlow: Dialogflow V2 Unity Plugin Prototype : https://itp-xstory.github.io/uniFlow/#step5

I changed the post request routine as following : PostRequest("https://dialogflow.googleapis.com/v2/projects/my_project_name/agent/sessions/34563:detectIntent", my_token_from_previous_steps)); and also in the bottom as described in the video. But, when running the example in unity i get the following 03 outputs :
################################################
{
"queryInput": {
"audioConfig": {
"audioEncoding": 0,
"sampleRateHertz": 0,
"languageCode": "",
"phraseHints": []
}
},
"inputAudio": ""
}
UnityEngine.Debug:Log(Object)
d__2:MoveNext() (at Assets/NewScript.cs:38)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
NewScript:Start() (at Assets/NewScript.cs:18)
################################################
400
UnityEngine.Debug:Log(Object)
d__2:MoveNext() (at Assets/NewScript.cs:51)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
################################################

HTTP/1.1 400 Bad Request
UnityEngine.Debug:Log(Object)
d__2:MoveNext() (at Assets/NewScript.cs:52)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
################################################
The mentionned lines from the NewScript.cs script are :
18 : calling the PostRequest(
38 : Debug.Log(jsonRequestBody);
51 : Debug.Log(postRequest.responseCode);
52 : Debug.Log(postRequest.error);

I'm using unity 2019.3.7f1 in Windows10-x64, and i followed the tutorial step by step, could you help please ?

Thank you,

@k-koleva
Copy link

Did you manage to figure this out? I am having the same problem.

@kalaivani1312
Copy link

i too having same issue

@jhuh3226
Copy link

I too have the problem and has anyone solved the issue?

@jeanniequah
Copy link

Did anyone manage to solve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants