0

Is there an actual difference between HTTP PUT and POST requests, or is it just a semantic thing?

I'm currently trying to make an API for my PHP web app and so far I'm using GET to, of course, get data, and POST to create and update anything available in my API.

Essentially, does POST behave differently to PUT? Or do they actually do something different (rather than just mean something different)?

emma.fn2
  • 229
  • 1
  • 10
  • See http://stackoverflow.com/questions/4117621/post-vs-put-when-posting-a-form – Mihai8 Apr 01 '13 at 14:54
  • POSTs are implicitly not idempotent. PUTs are. – Matt Ball Apr 01 '13 at 14:55
  • @MattBall sorry to sound stupid but what does that imply? I understand POST is for creating, PUT is for updating...but what I'm trying to find out is if PHP treats PUT & POST in the same way or not. – emma.fn2 Apr 01 '13 at 15:05
  • @emma.fn2 In short it means of you do multiple PUT requests, the end result is going to be the same, if you do multiple POST requests, the result is going to be different – Ikke Apr 01 '13 at 15:13

0 Answers0