Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to call the subscribe api using Axios in React frontend #377

Open
eakenbor opened this issue Nov 27, 2021 · 0 comments
Open

Unable to call the subscribe api using Axios in React frontend #377

eakenbor opened this issue Nov 27, 2021 · 0 comments

Comments

@eakenbor
Copy link

Calling the url "//subscribe/" using axios from a React frontend does not work when the user is not authenticated. However, it works on Postman when using form-data instead of the request body.

Here is my code:

const formData = new FormData()
formData .append("email_field", "example@email.com)
axios.post("/<general-newsletter/subscribe/", formData )

On sending, nothing happens in the backend instead of registering the email as an unactivated subscription.

Please can someone help me with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant