-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
All POST requests being sent twice. #25
Comments
Just to update, as you will notice I was allowing the bad requests to save as objects on the api. I went ahead an threw a 400 if the data was empty, and sure enough as I expected, the http-client ignored the 400 and came back with the 201 (of the good request with the proper data). |
Hi there, I've created a Unit Test to check whether it's an API issue. Seems not to be so. Here is the code if you wan't to check it yourself:
So I guess it's related to something specific to your application. Dunno maybe you're calling the method by incident a second time or so. Just add a breakpoint to your |
The addOrganization() function is only being called upon a form submittal. So unless the form is being submitted twice, I am not sure how my application would be making double requests. Just the behavior of the two requests really seems like a bug somewhere. One was completely silent as far as dev tools was concerned, the other was not. I will take a look again at my code, but it really is dead simple whats going on. |
And now it seems to no longer be doing it at all. shrug. I did do some refactoring of all that code so i suppose I must of been doing something whacky previously. Thanks for taking the time to write up a test case for my own error :) |
No problem at all. Glad it got solved |
As far as I can tell in version 0.5.3, all of my POST requests are being sent twice. Once with the proper data I would expect (though this seems to happen silently as it is not picked up by the dev tools in browser, but it is in my api server's logs.), then a second time with the payload of nothing for all data variables. So basically, every time I post, I am seeing two separate POST requests to the api server. One that is legitimate and one that is just a garbage request with no data payload.
an example request with empty payload
Excerpt from the api server logs showing two posts back to back, one with the data, one without.
My code is fairly straight forward:
The text was updated successfully, but these errors were encountered: