Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What do you think would be the primary reasons to make APIs with REST or OData instead of just making everything custom (for example only using GET requests, even for setting variables). Reasons for the opposite also welcome.

As a bit of background, it's going to be used for a request that is sent once every few minutes as a master-server updater for a game (as well as by clients for querying).

share|improve this question
up vote 3 down vote accepted

The main reason is because you (attn buzzword bingo) fully leverage HTTP.

For example, if you only use GET requests, caches or proxies may get in the way, not (re)sending requests when you want to.

Using URLs to identify resources, means you can use all your favorite web-server tools, such as mod_rewrite.

Compare this to SOAP for example, which uses one URL and posts all requests there. That makes the URL useless. You cannot use log-file analysis tools to see which requests are popular, you need specific tools to do load testing, etc.

share|improve this answer

Because REST plays well with others. When using a rest interface, you may use all the nice things that were invented for http. For example, you get load balancers, command line clients, traffic analysers more or less for free. When implementing a custom protocol on top of TCP/IP, you have to write them yourself. When using HTTP 'incorrectly', the http-tools wont work correctly (for example, they could cache a get request you expect to have a side effect, or execute it preemptively)

share|improve this answer
and besides that: all the cool kids are doing it. – keppla May 30 '11 at 15:26
Great points, +1 – Teo Klestrup Röijezon May 30 '11 at 15:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.