HTTP / REST Clients
By far the most common contract definition is an http client contract. Most http contracts are json contracts.
For each interaction in an http client contract, you describe:
- The server state: This is usually a human readable string, eg "a user exists with ID=123".
- The http request: This is the request your client will send.
- The http response: This is what you expect the server to respond with in the given server state. Note that this is a minimal response - if your consumer doesn't need a particular field, you don't need to include it in the contract.