We've recently started using UnityWebRequests and something that it is lacking is some way to dictate how many retries it should do before failure, and a manual timeout timer.
No big deal, we'll just wrap it and have our own retries and timeout timer.
Except.... There is no way to Send a UnityWebRequest twice. That sucks, I guess we'll just allocate memory a bunch of times for retries. Fine. Except... There is no constructor that lets you copy one request's info into another.
Any suggestions that don't involve manually copying one request's data into another?
Check out this link - How can I send and receive data to and from a URL, i.e. server side scripts, web services, etc?
Hope this may help you. Nsks
Thanks for the reply but that thread is unrelated. I am using UnityWebRequest, not WWW. I am successfully using UnityWebRequest to perform all HTTP requests. My question is about saving on allocations, removing ugly/bad code, and reducing the amount of work we have to do to add basic functionality around the UnityWebRequest.
Answer by IshanCK
17 hours ago
Yeah you can do that
How is this an answer?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
5 People are following this question.
Does Unet Networking Supports Online Multiplayer?
WebGL Uncaught RangeError
Data pass using POST method - WebRequest object
Check if there is a host on a specific IP?
[Unet] Player object loses authority on scene switch