Is HttpWebRequest supported for desktop and editor?

I’ve found many questions whether HttpWebRequest is supported for mobile, but haven’t found any about standalone desktop builds.

Is this API supported for desktop builds and has anyone tried to use it in production? Are there any caveats?

WWW is not enough in my case.

I’m researching if I can use a library (SignalR), that relies on HttpWebRequest API and I’m not able to rewrite the code for WWW as WWW lacks some required functionality and hangs sometimes (e.g. when I try to get WWW.bytesDownloaded for a long-polling request)

HttpWebRequest seems to work in desktop/editor environment. But I’m afraid of glithes in the production and a lack of official support on those cases.

That’s why I ask if this API is supported for desktop builds.

It should work identically on all platforms if you’re using the WWW class.

It definitely works and I have personally used the HttpWebRequest API in several shipping projects, at least on Windows.

I had some issues with it blocking (even using the asynchronous API) so I would highly recommend doing any work in another thread and use a queue or some other form of synchronization to share with the main Unity thread.

Also consider WebClient, which provides a simpler interface, depending on what you’re doing.