Skip to content

Instantly share code, notes, and snippets.

@n3dst4
Last active April 10, 2022 03:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n3dst4/22bf618e6417d847378633af77a97fe5 to your computer and use it in GitHub Desktop.
Save n3dst4/22bf618e6417d847378633af77a97fe5 to your computer and use it in GitHub Desktop.
HATEOAS pros/cons

HATEOAS Pros/Cons

+Pros

  • Makes discovery easy (good for new integrators)
  • Encourages consistency
  • Client software does not need to maintain a list of URLs
    • but they do need to maintain a list of link relations
    • but link relations are cleaner?
  • Improves API reuse over long horizons with multiple clients

-Cons

  • You do need link names!
  • Does not encourage good URLs
  • Doing discovery every time is chatty
  • Proxying is a bugger because you have to rewrite all the URLs
  • Maintenance is more complex
  • GraphQL is probably better anyway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment