Tarayıcıdan titreşime veri gönderiyorum. Titreşimli konsolda anında istek alıyorum. Ancak tarayıcı konsolunda, konsol.log 5-8 saniye beklemem gerekiyor. Ve sorunun nerede olduğunu anlayamıyorum.Tarayıcı neden titreşimli tepki veriyor?
postQuestionsContent : function()
{
this.$http.post('http://127.0.0.1:8080/questions', JSON.stringify(this.questions)).then(function(response)
{
console.log("Server response: ", response.status); // 5-8 seconds here
}, function(response)
{
console.log("Server report that it can't process request");
}
);
}
Ve D kodu:
void getQuestions(HTTPServerRequest req, HTTPServerResponse res)
{
if (req.session)
{
Json questions;
try
{
questions = req.json;
writeln("We got questions content!");
res.statusCode = 200;
}
catch (Exception e)
{
writeln("Can't parse incoming data as JSON");
writeln(e.msg);
writeln("------------------------------------------");
}
}
else
{
res.statusCode = 401;
}
res.writeVoidBody;
}
Ne o tarayıcınızdakilerle var kullanmak denemeliyim? Sunucu yanıt vermek için çok uzun sürerse, gelen ve giden HTTP isteklerini günlüğe kaydedip bir şişe boynu bulun. – Pavlo
Tam olarak neler olup bittiğini görmek için vibe çalıştırılabilirliğini --vv ile çalıştırmayı deneyebilirsiniz. –