当我向某个端点发送删除请求时,例如从终端发送
httpie
@H_403_2@http删除http:// localhost:8181 / admin / applications / uspecs
@H_403_2@我得到了一个有效的行为,如{success:true}作为响应主体.
但是,当我这样做
但是,当我这样做
fetch ( 'http://localhost:8181/admin/applications/uspecs',{ method: 'DELETE',} ) .then( res => doSomethingWithResponse()) .catch( err => cosole.error(err))@H_403_2@在javascript代码中,然后我得到了一个
Fetch API cannot load http://localhost:8181/admin/applications/uspecs. Method DELETE is not allowed by Access-Control-Allow-Methods in preflight response.@H_403_2@控制台上的错误.我错过了什么?我在选项请求上获得了有效的方法列表.