[2017.3] Error 411 Length Required
ZephyrRaine opened this issue · 2 comments
Hello there, thanks for making an updated version of this tool!
I ran into Error 411 Length Required while trying to Post a card to Trello. It looks like since 2017.3 they changed the default value of their chunked content parameter for requests.
I haven't managed to change it on the WWW unity object so I used UnityWebRequest like so:
`UnityWebRequest www = UnityWebRequest.Post(string.Format("{0}?key={1}&token={2}", _cardBaseUrl, _key, _token),post);
www.chunkedTransfer = false;
// WWW www = new WWW(string.Format("{0}?key={1}&token={2}", _cardBaseUrl, _key, _token), post);
UnityWebRequestAsyncOperation oper = www.SendWebRequest();
// Wait for request to return
while (!oper.isDone) {
// CheckWwwStatus("Could not upload the Trello card.", www);
}
Debug.Log("Uploaded card to trello");
`
Haven't checked with 2017.3, I'll try it out and fix that. Thanks!
Apparently is not a change, but rather a bug of 2017.3, and should be fixed on the next patch.
But, searching around seems that WWW is not recommended for use and is softly-deprecated, so I'll switch all calls to UnityWebRequest.