Right way to accommodate an HTTP GET that could "skip" to a POST? -
let's have http request skipped in circumstances. example, imagine have:
get /orders/new, lets pick flavor of water ice cream want post /orders, makes new water ice cream order normally, get /orders/new shows list of flavors , submit button. if there's 1 flavor available today, you'd post order avoid having user create useless decision. (we'll imagine universe in likes flavors as , happy dictatorial water ice cream choice.)
it doesn't seem right "redirect post" request, since wouldn't idempotent. what's right way this:
if there's more 1 flavor: allow user pick flavor(s) want order if there's 1 flavor: pick flavor order , create order either way, wind newlyposted order
it's get, should never result in post. period. if want avoid choice, avoid doing get exclusively somewhere in flow before get /orders/new. maybe want see flavors, not proceed order.
http
No comments:
Post a Comment