When I recently added 'click to unsubscribe' functionality to my emails, the URL got wrote out into some logs. Those logs got written to a Slack channel and Slack loves to click any link it sees. Oh, and it doesn't respect robots.txt. But all I saw was every member of my list clicking 'unsubscribe'. It took a good hour to figure out exactly what was going on. Idempotence is not the problem here, by the way. That just…
Aren't you allowed to have your "click to unsubscribe" button lead to a page with a button that does a POST that actually unsubscribes? I feel like I've seen that approach in use.
You know how HTTP GET requests are meant to be idempotent?
111–120 of 313 posts
Re: You know how HTTP GET requests are meant to be idempotent?
#112I have a small (golang) agent that runs on over a thousand raspberry pi class machines (not on the open internet). The agent has a GET /reboot api because it is really convenient to be able to just hit that url in a browser window when we need to. Adding all the no-cache headers to the response seems to have worked well enough to prevent browsers from randomly hitting the url. I just added a check for the x-purpose h…
This still seems like really bad idea when the POST request is right there. Serve a page with a button saying "are you sure"?
Re: You know how HTTP GET requests are meant to be idempotent?
#113Earlier quoted context omitted.
Aren't you allowed to have your "click to unsubscribe" button lead to a page with a button that does a POST that actually unsubscribes? I feel like I've seen that approach in use.
Don't make your users jump through hoops to unsubscribe. That seems like a typical dark pattern to me.
Re: You know how HTTP GET requests are meant to be idempotent?
#114Two thoughts: 1) Twitter is a terrible medium for anything, let alone posts longer than a sentence. 2) The level of over-engineering tech people readily engage in without a second thought is truly mind boggling.
Re: You know how HTTP GET requests are meant to be idempotent?
#115Earlier quoted context omitted.
Don't make your users jump through hoops to unsubscribe. That seems like a typical dark pattern to me.
Having a single confirmation step to prevent "oops" clicks doesn't seem like a dark pattern to me.
Re: You know how HTTP GET requests are meant to be idempotent?
#116Earlier quoted context omitted.
Don't make your users jump through hoops to unsubscribe. That seems like a typical dark pattern to me.
Having a single confirmation step to prevent "oops" clicks doesn't seem like a dark pattern to me.
Re: You know how HTTP GET requests are meant to be idempotent?
#117Two thoughts: 1) Twitter is a terrible medium for anything, let alone posts longer than a sentence. 2) The level of over-engineering tech people readily engage in without a second thought is truly mind boggling.
2) He's just having fun, working on a side project that's useful to him, and learning. Nothing wrong with any of that.
Why so negative?
Re: You know how HTTP GET requests are meant to be idempotent?
#118Earlier quoted context omitted.
Don't make your users jump through hoops to unsubscribe. That seems like a typical dark pattern to me.
Having a single confirmation step to prevent "oops" clicks doesn't seem like a dark pattern to me.
Re: You know how HTTP GET requests are meant to be idempotent?
#119Earlier quoted context omitted.
GET requests should have no side effects. In other words NOOP is idempotent
Reading from a database isn’t “side effect free”, neither is reading from a mutable variable. Given that HTTP requests are supposed to trigger database reads that may return a different result after some time, then “side effect free” would indeed be incorrect. The litmus test is ... does it always return the same output given the same input? If that can change, the it’s not describing a pure function, but a side effe…
Re: You know how HTTP GET requests are meant to be idempotent?
#120Earlier quoted context omitted.
> you'd build a REST application Nah, nerds would come out of the woodwork to inform you that what you've built is not a real REST.
Yeah - there's always a HATEOAS comment somewhere and I've never really managed to figure out what that means beyond using URI's rather than a database IDs + some documented endpoint path to point to other resources.