LaunchPadLab/lp-redux-api

Add helper api method for DELETE requests

Closed this issue · 0 comments

  • Add delete method to API:
export function delete (url, body) {
  return http(url, {
    ...OPTIONS,
    body,
    method: 'DELETE',
  })
}
  • Add DELETE to list of CSRF methods in http:
const CSRF_METHODS = ['PATCH', 'POST', 'PUT', 'DELETE']