Imagine that you sent the following ajax request: post('/process', {name:'john'}, function(data){ 1 Do some stuff What will be the answer from the server? Tip: On server side, we have the code which is given below Code:

4 phương ánCó giải thích
Đề bài
app.post('/process', function(req, res){
  var data = ''; if(req.xhr){
    data += 'One'; if(req.body.name){
      data += 'Two'; res.send(data);

Các phương án trả lời

Chọn một phương án
Lời giảiChọn phương án để mở
Khi bạn gửi yêu cầu AJAX POST đến đường dẫn '/process' với dữ liệu {name: 'john'} và một hàm callback, thì câu trả lời từ server sẽ là gì?

Cùng chủ đề

Xuất hiện trong 1 bộ đề