- Home /
UnityWebRequest.url not updating in WebGL
I am creating a new UnityWebRequest and the resulting page that it lands on redirects to another page. The resulting page at the end is actually "not there" so you get a 404 error. On every build this works and my request.url in C# code gets updated to the "missing" page, except with WebGL. If I open the Javascript console in safari/chrome etc, I can see the 404 error with the correct URL for the "missing" page, but for some reason in unity the request.url isn't updating at all.
using (UnityWebRequest request = UnityWebRequest.Post(url, form))
{
yield return request.SendWebRequest();
if (request.isNetworkError || request.isHttpError)
{
if (request.responseCode == 404)
{
Debug.LogError(request.url); // this updates to the "missing page" on every OS except WebGL
Any thoughts?
For a better frame of reference I am authenticating with a Keycloak instance. The redirect is supposed to hit your client that is "listening", but in unity's case there is nothing listening so I just grab what I need out of the new url (there is a code stuffed into it)
Your answer
Follow this Question
Related Questions
Web based AR app 9 Answers
Fluid webplayer rendering issues in some browsers 0 Answers
How to load a webpage using PowerUI for Android Platform [VR] 0 Answers
InGame Interactive Computer 0 Answers
How can I load 3d models(.obj, .fbx) dynamically in to unity scene after building it to WebGL ? 1 Answer