prevent ?email=&password= from attaching in the url bar
Unanswered
Ejayz || PiggyDev posted this in #help-forum
Hi how do i prevent this from attaching in my address bar ? It sometimes do not attach but sometimes it do
12 Replies
Komondor
Are you making a GET request to your server and adding those fields into the query params?
nope. i am making a post request
i am using formik and client side with fetch
Komondor
Can you share your code?
do you want it in github ?
Komondor
I don't see anything out of the ordinary, using the regular fetch call with POST and putting the user/pass in the body. Can you include a screenshot of what you're seeing
I'm thinking that OP has a form and it doesn't have preventdefault on event listener and as such, adds the query params to the url and reloads page
American black bear
In react hook forma also happend
ahhhh probly add prevent default or something so it wont trigger a post or probly add POST method on form probly? it is weird
@Komondor I don't see anything out of the ordinary, using the regular fetch call with POST and putting the user/pass in the body. Can you include a screenshot of what you're seeing
it is just like with that query appended when aubmitting form .
it sometimes do not show sometimes it shows