Hacker News new | ask | show | jobs
by fleetfox 1651 days ago
When it comes to REST it's important to return correct response code. As to what comes in body is mostly convention and there are no standards. Here is an example for rest: https://github.com/Microsoft/api-guidelines/blob/master/Guid...

JSON-RPC is a bit more concrete: https://www.jsonrpc.org/specification#error_object But again what you put into data is up to you.

Response structure might also depend on the client (content negotiation)