Search Unity

Send Headers using WWW Get

Discussion in 'Web' started by indie6, May 31, 2017.

  1. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    Hi,

    I have a game deployed on Site A, which uses a WWW call to get data from Site B.
    I have enabled CORS settings on Site B and have been able to successfully make a call get the response.

    The issue
    When I add Headers to the WWW call, I get "Unknown error." as a response from the server. A WWW call with empty headers results in a successful call.
    I have also added the custom header in Access-Control-Allow-Headers, the default headers work fine, like content-type. Is this some issue with WWW?
     
  2. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,168
    Why you don't use UnityWebRequest ?