Hi, im trying to make a Post request using UnityWebRequest, and the endpoint in using requires me to have 2 headers: Content-type and Authorization, i tried to do this :
using (UnityWebRequest www = UnityWebRequest.Post("url", js))
{
www.SetRequestHeader("Content-Type", "application/json");
www.SetRequestHeader("Authorization", "Bearer ***");
yield return www.Send();
however, if i use the SetRequestHeader more than once, i get unknown http error
cant really find any good info about doing this in the new unityWebRequest, i only found info about the older method using wwwrequest
↧