Why do iOS web requests stop working after a few hours?
SSLHandshakeException during Web Request
www request Error unity 2018
WebException: Error: NameResolutionFailure
Issue with sending Json via UnityWebRequest
How do I get into my StreamingAssets folder for the Web?
Objectives:
- Understanding the proper way to FIND the url path for the StreamingAssets
- An explanation on the similarities and differences between web and mobile for saving and loading JSON files from the StreamingAssets folder
I have seen other questions on here but none that answered concisely about web which helped to understand the proper steps.
WebRequest 407 errors,Web Requests behind a proxy
Empty Error DownloadHandler
HttpWebRequest doesn't work with Hololens
UnityEngine.WWW' has been forwarded to an assembly that is not referenced
Usage of DownloadHandlerAudioClip.streamAudio
Establish a constant connection to a web server
not working properties DefaultCredentials, DefaultNetworkCredentials class CredentialsCache
java.io.EOFException error
MultipartFormDataSection not working - Error: 403
And I found out I am not able to pass values with ***MultipartFormDataSection*** but ***WWWForm*** is successful to pass values.
**This is my Multipart Code:** List
Forbidden
You don't have permission to access /projects/BoLe/api/saveimage.php
on this server.
----------
**This is my WWWForm Code**
WWWForm formData = new WWWForm ();
formData.AddField ("fileName", "i_am_fileName.png");
formData.AddField ("fileName2", "i_am_fileName.png2");
UnityWebRequest wwwGetURL = UnityWebRequest.Post ("http://www.{myserver}.com/projects/BoLe/api/saveimage.php", formData);
wwwGetURL.chunkedTransfer = false;
yield return wwwGetURL.Send ();
Debug.Log (wwwGetURL.downloadHandler.text);
***The Result is :***
{"return_code": "0","data_content": {"img_url":""},"return_msg": "No File"}
Which mean the request was processed successfully, and return proper message.
----------
I was wondering why ***MultipartFormDataSection*** is not working with Error: 403.
UnityWebRequestMultimedia dosent load local file MacOS
WebGL CORS error when trying to get text from a URL. Even when CORS is set?
Since uploading the WebGL build to a seperate domain it's failing to get the URL. I'm getting this Cross-Origin Resource Sharing error in the browser console:
Access to XMLHttpRequest at 'https://dirtylime.com/games/highscores/display.php?game=space_runner' from origin 'https://uploads.ungrounded.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
But my webpage does have a Access-Control-Allow-Origin header set to * so I can't figure out what could be stopping it.
I can confirm that the header is set using an online testing tool. http://tools.seobook.com/server-header-checker/?url=https%3A%2F%2Fdirtylime.com%2Fgames%2Fhighscores%2Fdisplay.php%3Fgame%3Dspace_runner&useragent=8&protocol=11
Here's the C# code I'm using to try load the URL:
UnityWebRequest hs_get = UnityWebRequest.Get(highscoreURL); yield return hs_get.SendWebRequest(); if (hs_get.isHttpError) { scoresText.text = "There was an error getting the highscores:\nPlease try again."; } else { scoresText.text = hs_get.downloadHandler.text; }