- Home /
Error when creating request. POST request with a zero-sized post buffer is not supported
Am trying to download a unity package which i have in https secured site, And when i try to download it via WWW. Am getting the following error,
"Error when creating request. POST request with a zero-sized post buffer is not supported"
Am following the ref from WWWForm and following it only...
Can you please help me out ??
Thank you...
Answer by Lev-Lukomskyi · Jul 11, 2015 at 05:42 PM
WWW reference page states:
The WWW class can be used to send both GET and POST requests to the server. The WWW class will use GET by default and POST if you supply a postData parameter.
But when you supply new WWWForm()
or new byte[]{}
parameter then you get that error POST request with a zero-sized post buffer is not supported (tested this right now on Unity 5.1)
So, it appears that you cannot do POST with empty post data with WWW class.. You can send some fake data, or 0-byte like this:
var www = new WWW(url, new byte[]{0});
It is lame but it works for me
This solution worked for me too, providing dummy byte array.
Answer by maspi · Dec 28, 2012 at 08:58 PM
You simply have to add a Field (Ex.: sendForm.AddField("fake", "xy"))
hey sid kya aap mujhe apna phone number de sakte ho . mujhe unity se related kuch puchna hai.actually error solve nhi ho rha hai
Please post a question and provide link to me. Also Unity personal conversion is also available.
Your answer
![](https://koobas.hobune.stream/wayback/20220613083103im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
HTTPS Tutorial 0 Answers
http request over an https webgl 1 Answer
Working behind a proxy on client site 0 Answers
http NotSupportedException in Web Player 1 Answer
How can I add a certificate to the Mono Trust store? 1 Answer