method: "POST",
                      
                      
                                headers: {
                      
                      
                                      "Authorization":Bearer ${getLocal().accessToken},
                      
                      
                              "Content-Type": "application/json",
                      
                      
                                "Accept": "application/json",
                      
                      
                                  },
                      
                      
                       
                      
                      
                            body:{
                      
                      
                                  "text": "ПОЛЕТАЕВ СООБЩЕНИЕ", 
                      
                      
                                  "sendBy":{
                      
                      
                                      "id": 3,
                      
                      
                                      "userName":"romans"
                      
                      
                                  }, 
                      
                      
                                  "readBy":0
                      
                      
                              }
                      
                      
                              }).then(async function(response) {
                      
                      
                                  // console.log(response);
                      
                      
                      
                      
                      
                                 return response.json();
                      
                      
                              }).then(async function(data) {
                      
                      
                                  
                      
                      
                                  console.log(data);
                      
                      
                              // Do smth with data here
                      
                      
                              });
                      
                      
                    
нормально url прописать?
Обсуждают сегодня