I’m pining a Rasa server through Ngrok and postman is working fine…
it was working in few test, but then like 3rd time test… the return text will be empty
any possible reason?
I’m using Unity 2018.0.3.f2
Windows 10
I’m building it for android and Ios (unity cloud build)
Setting the Accept-Encoding header is not recommended on all platforms, just on Windows I know for sure you are harming yourself by putting gzip there.
Use some HtTP debugging proxy, like Fiddler, to inspect the actual network traffic, that usually reveals the problems.
Also, instead of using text property on download handler use data property and see how many bytes you have received. It can be that you received a zipped response that wasn’t unzipped automatically (because platform doesn’t support it) and when the zipped bytes were converted to string, it resulted in something that looks empty when printed.
You’re using a lot of UnityWebRequest features all at once, and I don’t think you need to. Just make a plain post without specifying a bunch of headers or a download handler. Also, don’t deserialize, just print the text first to see that it’s doing what you think it’s doing.
Your deserialization is a little fishy because itemData appears to be an array. An array primitive isn’t a valid JSON type, so it’s unlikely Rasa is giving you arrays.
Clearly there’s some confusion with how your server is working, especially if it works a few times and then stops working.