What's wrong with UnityWebRequest.Post()

First of all VS says it doesn’t have a Post type, and underlines it:

Second thing, according to manual, you have to use method as a parameter, and you have to use download and upload handlers:

Third thing, all the other docs and answers around still use it as .Post().

Can someone tell me a correct up to date alternative to that:

UnityWebRequest www = new UnityWebRequest.Post("http://url.com", formData);

with those download and uploadhandlers

public UnityWebRequest(Uri uri, string method, Networking.DownloadHandler downloadHandler, Networking.UploadHandler uploadHandler);

Thanks!

UnityWebRequest.Post() is a static method, don’t put new before it.

1 Like