Code: Select all
//test change timeout to 30
Chilkat.Http oHTTP = new Chilkat.Http
{
ConnectTimeout = 2,
ReadTimeout = 2,
HeartbeatMs = 250
};
//test or live
string reqPath = "/info.php";
string reqDomain = "127.0.0.1";
int reqPort = 6348;
bool reqSSL = false;
// REM sending request to server
Chilkat.HttpRequest oReq = new Chilkat.HttpRequest
{
Path = reqPath,
HttpVerb = "POST",
ContentType = "multipart/form-data", //{"application/x-www-form-urlencoded", "application/json", "multipart/form-data"},
Charset = "utf-8",
SendCharset = true
};
//Params
oReq.AddParam("devMode", $"yep");
oReq.AddFileForUpload("installerFile", @"f:\Temp\dev image.bmp");
Chilkat.HttpResponse oRes = oHTTP.SynchronousRequest(reqDomain, reqPort, reqSSL, oReq);
string webResponse;
if(oRes == null)
{
File.WriteAllText(@"f:\Temp\ck.log", oHTTP.LastErrorXml);
webResponse = "!fail!";
}
else
{
webResponse = oRes.BodyStr;
File.WriteAllText(@"f:\Temp\ck.res", webResponse);
oRes.Dispose();
}
oReq.Dispose();
oHTTP.Dispose();
< /code>
Es ist mit der folgenden Fehlermeldung fehlgeschlagen: < /p>
The server did not respond in 2000 milliseconds.
Also? Was haben sie in Version 11 geändert, was dazu führt, dass nicht funktioniert? Ich glaube nicht, dass ich mich an die alte Version halten muss? richtig?
Mit freundlichen Grüßen