RESTful API practices in the realworld
-
Is it ever really appropriate to create resources on a GET? I've received the answer we've done it this way for all these other situations and "the UI shouldn't have to make extra calls" If I'm setting up a user in a 3rd party system is it really bad to be making a separate call to make that integration with our system? Either I'm missing some kind of RESTful wisdom here or we're keeping the UI lighter from responsibilities it should bear. I'm not really sure which here.
Well, who doesn't release stuff like that ? Microsoft software is just as bad. Christian Graus That's called seagull management (or sometimes pigeon management)... Fly in, flap your arms and squawk a lot, crap all over everything and fly out again... by _Damian S_
-
Is it ever really appropriate to create resources on a GET? I've received the answer we've done it this way for all these other situations and "the UI shouldn't have to make extra calls" If I'm setting up a user in a 3rd party system is it really bad to be making a separate call to make that integration with our system? Either I'm missing some kind of RESTful wisdom here or we're keeping the UI lighter from responsibilities it should bear. I'm not really sure which here.
Well, who doesn't release stuff like that ? Microsoft software is just as bad. Christian Graus That's called seagull management (or sometimes pigeon management)... Fly in, flap your arms and squawk a lot, crap all over everything and fly out again... by _Damian S_
wolfbinary wrote:
Is it ever really appropriate to create resources on a GET?
No.
GET
,HEAD
, andOPTIONS
requests are meant to be idempotent: What are idempotent and/or safe methods? - The RESTful cookbook[^] There could be any number of devices between the client and the server which will expect to be able to reissue an idempotent request multiple times without side-effects. Anything which alters the data should be using a more appropriate method -PUT
,POST
,PATCH
, orDELETE
.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer