The Exchange Protocol - Nasty Nomenclature Skip to main content

The Exchange Protocol

When two systems want to... interface... they need to agree on how to touch each other. Here are the standards for a safe and pleasurable data exchange.

data_object

JSON Bodies

The payload. The meat. When sending a JSON body, most modern APIs prefer the gentle curves of camelCase .

{ "userPreferences": { "likesItRough": true } }

*Unless you're talking to Python or Ruby backends, then they might want the long snake.

link

URL Parameters

The address. How you find the spot. URLs are case-insensitive, so keep it lowercase. Use kebab-case or snake_case .

/api/users?sort-by=date&include_images=true

*Never use camelCase here. Some servers convert everything to lowercase, and your hump will get flattened.

http

HTTP Headers

The foreplay. Setting the mood before the request. The standard here is Train-Case (or Kebab-Pascal).

Content-Type: application/json
X-Auth-Token: 12345

*Capitalize the first letter of each word. It shows respect.