[英][AxiosError: Request failed with status code 404]
const handleSubmit =() => {
const data ={
Email:email,
Phone:phone,
FirstName:firstName,
LastName:lastName,
Message:message,
City:city
}
return (
axios.post('https://sheet.best/api/sheets/8fab09ad-f573-4efb-b657-da532ca25f4b',data)
.then((response) => {
console.log(response)
setCity('')
setEmail('')
setLastName('')
setMessge('')
setPhone('')
setfirstName('')
})
.catch((error) => {
console.log(error)
})
)
}
恕我直言 404 意味着您正在尋找的端點不存在。 在某些情況下,這也意味着您嘗試執行的方法是錯誤的,例如此端點存在但它不是 POST 類型。 嘗試在郵遞員上運行此 API 以確保您沒有做錯任何事情。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.