Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

Send POST request to HTTPS

$
0
0
Hello, I'm sending my post request to **HTTPS** page `https://example.com/index.php?fc=module&module=mydemomodule&controller=display` this way: IEnumerator CaptureScreenshotAndPost() { byte[] imageBytes = screenImage.EncodeToPNG(); WWWForm form = new WWWForm(); form.AddField("hello", "yellow"); form.AddBinaryData("fileToUpload", imageBytes, "screenShot.png", "image/png"); UnityWebRequest www1 = UnityWebRequest.Post("https://example.com/index.php?fc=module&module=mydemomodule&controller=display", form); yield return www1.Send(); if (www1.isNetworkError || www1.isHttpError) { Debug.Log(www1.error); } else { Debug.Log("Upload completed!"); } } But getting the following error Mixed Content: The page at 'https://example.com/index.php?fc=module&module= mydemomodule&controller=display' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://example.com/index.php?fc=module&module= mydemomodule&controller=display?fc=module&module= mydemomodule&controller=display'. This request has been blocked; the content must be served over HTTPS.

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>