Discussion

Ask HN: How do I convince my coworkers to use HTTP well? Or am I being a pedant?

Throwaway account here.

I work on a team that is developing a mobile app with an HTTP-based backend. Except for me, everyone is attempting to reinvent the wheel. They are:

1. HTTP 200 everything, unless it's a 500 internal error, or the route requested doesn't have a handler (404).

2. POSTing everything.

In cases where, say, a route exists but the resource requested does not, they return a 200 with a JSON payload that identifies some internal error code (the list of which is not currently well documented).

In cases where a client requests a resource, the request is sent as a POST with either a querystring or JSON body. Same for updating, same for deleting.

My question:

How would you convince them to use HTTP as God (Mr. Fielding) intended? Things to note:

1. It's a small, new team. I believe they can be swayed, but I want to make it an easy argument.

2. The API is (currently) completely private. Only internal developers use it, so until we have external folks accessing it, it's kind of a matter of taste. I reason that we shouldn't assume it will never have external consumers. Still, I'm not sure: am I being too pedantic?

If my argument is worth pursuing, can you help me build it to be short and strong? Anything other than the whole W3C spec and a dissertation that might sound convincing to them? Or should I just keep quiet and work on?

8 points supersecret 11 years ago 10 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton