I'm trying to submit a form made in unity via WebRequest, but i always get a 404 error. I even wrote a C# WinForm that also submit a form and it works. Do I need to do something specific in Unity for this to work ?
code that send the request.
public string SendRequestPost2(string link, Dictionary<string,string> parameters)
{
using (var wb = new WebClient())
{
var data = new NameValueCollection();
var stringValue = string.Empty;
foreach (var parameter in parameters)
{
data[parameter.Key] = parameter.Value;
}
var msg = String.Format("[{0}], Sending POST request, Link : {1}, Parameters: {2}", DateTime.Now, link, stringValue);
Logging.LoggingService.LogDebug(msg);
var response = wb.UploadValues(link, "POST", data);
var s = wb.Encoding.GetString(response);
return s;
}
}