I have a dispatch in one of my components that calls by form submission:
const handleSubmit = (values) => {
dispatch(resetPassActionCreator(values.email));
};
and this is resetPassActionCreator
function:
export const resetPassActionCreator = username => dispatch => {
const url = PASSWORD_RESET_GET_EMAIL;
dispatch(
apiCallBegan({
url,
method: "POST",
onStart: passwordResetSlice.actions.resetPassword.type,
onSuccess: passwordResetSlice.actions.resetPasswordSuccess.type,
onError: passwordResetSlice.actions.resetPasswordFail.type,
data: {
username,
},
})
);
};
and I check the url
and it does not have ‘/‘ at the end.
can anyone tell me why the browser sends get request instead of post?