diff --git a/README.md b/README.md index ae7b4de..32c4849 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,12 @@ const App = () => {
  • url (string) (required)
  • data (required) - +- `apiDelete` (function) - deletes data from provided URL using the users id_token +
    + Parameters +
    #### User object diff --git a/src/lib/auth-provider.js b/src/lib/auth-provider.js index ec33d95..d6b1817 100644 --- a/src/lib/auth-provider.js +++ b/src/lib/auth-provider.js @@ -258,6 +258,7 @@ export const MsalProvider = ({ const apiGet = url => retry(() => axios.get(url)) const apiPost = (url, payload) => retry(() => axios.post(url, payload)) const apiPut = (url, payload) => retry(() => axios.put(url, payload)) + const apiDelete = url => retry(() => axios.delete(url)) return ( {children}