Put in axios cannot get data

function in js, two parameters, id and data
import axios from "axios";
import qs from" qs";
export let updateBook= (id,data) = > {
return axios.put ( / book?id=$ {id} , qs.stringify (data));
};
after sending the request, no data was obtained and an error was reported

case "PUT":
     if(id){
       let str = "";
       req.on("data",chunk=>{
         str+=chunk;
         console.log(str);
       });
       console.log(str);
       req.on("end",()=>{
         let book = JSON.parse(str);
         read(function (books) {
           books = books.map(item=>{
             if(item.bookId === id){
               return book
             }
             return item;
           });
           write(books,function () {
             res.end(JSON.stringify(book));
           })
         });
       })
     }
     break;
     console:
     

clipboard.png

Mar.25,2021

first determine whether the backend supports the put method.
check with the backend. Can it be done if it is post? Take a look at the joint adjustment

before changing it to put.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ae47-2c25a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ae47-2c25a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?