0
どのようにAngularJS $ http.delete
// notificationIds is array of ids.
deleteNotification(notificationIds) {
let query = `/notifications`
let params = {}
notificationIds.forEach((id, index) => {
params[`notificationIds[${index}]`] = id
})
return $http.delete(`wis`, query, params)
.then((response) => response)
}
==>で配列型のパラメータを送信するが、結果は次のとおりです。(不正なリクエスト!!)
リクエスト方法:
ステータスコードを削除します。 400 Bad Request
ヘッダーを追加しようとしましたか? – Gautam
はい私はそのヘッダーを追加しました:{'Content-Type': 'application/json; charset = utf-8'}しかし、同じ問題があったとしても、ヘッダーの値がわかりません –
あなたのヘッダに何が渡されているかチェックしてください。 – Gautam