Search Unity

Resolved http requests

Discussion in 'Scripting Dev Blitz Day 2023 - Q&A' started by andyz, Feb 23, 2023.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    So we used to have WWW, now we have UnityWebRequest, but the error results are somewhat changing over time for UnityWebRequest - I think 2022 changed the way they are handled.
    Auto script updates have not supported these changes well over the years although you may have been able to use older ways of doing things with warnings

    I suppose this brings up a couple of questions:
    1. Are the changes just part of an ever improving code base for http communication?
    2. Is there no standard/.NET equivalent of the exact same thing - what is underneath UnityWebRequest?
     
  2. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    For 1) yes, there are continual changes/improvements made.

    For 2) there is HttpClient however this is not currently supported as well as UnityWebRequest within Unity. The implementation of UnityWebRequest is a completely separate code base from the .NET networking stack. There have been been discussions around improving this and providing a great experience with .NET networking APIs across all Unity platforms, but there are no timelines for this to happen.
     
  3. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    Thanks, yes I was wondering about HttpClient and what the issues with using this .NET equivalent were.