http状态码返回415问题

前端请求时header中设置 contentType : ‘application/json’。

wx.request({
        url: 'http://localhost:8080/send/add2',
        method:'POST',
        header: { "Content-Type": "application/json", "userId": id },
        data:{
           
        },
        success(res){
           
        },
        fail(){
          
        }
      })

 

posted @ 2021-04-01 15:24  氧化成风  阅读(1336)  评论(0编辑  收藏  举报