Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Post endpoint firing twice

$
0
0

@killmore wrote:

After converting my project over to Ionic 3 using httpclient, I’m now running into the problem where my .Net api endpoint is running twice on post calls. This only happens the first time I hit a given endpoint. Subsequent calls only cause it to fire once.

Seeing as I’m specifying json headers I’m assuming an Options preflight request is the culprit, but I’m confused why the endpoint is processing both requests. Shouldn’t the preflight just confirm the post can be made and not actually deliver a payload to the endpoint? Are subsequent calls using cached info that alleviates future Options requests when hitting the same endpoint?

My logic inside the clients post subscribe is only getting hit once with a single response but my server logic is running twice, causing duplicate records being created. Is there a setting in IIS to configure or does Ionic posts using httpclient require more configuration? I’m assuming it’s related to httpclient as no other changes were made to the logic when converting to Ionic 3.

Any ideas or direction is appreciated.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>