Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Can't figure out settings for WWWForm in browser

Discussion in 'Multiplayer' started by erlGrey, May 11, 2016.

  1. erlGrey

    erlGrey

    Joined:
    Apr 8, 2014
    Posts:
    19
    Hello all!

    I can't for the life of me figure out what I'm supposed to do to get POST functions to work when I build for webplayer. There have been several different posts from people with the same problem, but seemingly no working solutions in them.

    The skinny:
    1. Everything works fine in editor/windows build.
    2. I use the form about as standard-ly as you can imagine.
    3. My self-made debug class returns an empty string (as opposed to an error) when trying to print the www's text (in the webplayer).
    4. I'm querying the same domain that the game is hosted on (www.myDomainName.com/myPhpScript.php, where the game is at www.myDomainName.com/myGame(.html & .unity3d)).
    I suspect there's some server setting (mine's with dreamhost) or header... thing that I'm unaware of, but I'm not sure where to look to even find out what. At one point I threw in a

    Code (CSharp):
    1.         header.Add("Access-Control-Allow-Credentials", "true");
    2.         header.Add("Access-Control-Allow-Headers", "Accept");
    3.         header.Add("Access-Control-Allow-Methods", "POST");
    4.         header.Add("Access-Control-Allow-Origin", "*");
    for giggles, but no joy.

    If anyone's had this problem or knows where to start looking to solve it, I greatly appreciate the advice :)

    Thanks!
     
  2. erlGrey

    erlGrey

    Joined:
    Apr 8, 2014
    Posts:
    19
    Sorry to bump this, but I'm still a bit miffed as to why I can't get a response from the server with these wwwforms (I've posted on Answers, too). Is it even possible to use them with webplayer?